{"id":415277,"date":"2024-06-30T00:16:27","date_gmt":"2024-06-30T00:16:27","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=415277"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=415277","title":{"rendered":"<span>\u0421\u043f\u0430\u0441\u0438\u0431\u043e, \u041c\u0430\u0440\u0438\u043e, \u043d\u043e \u043a\u043e\u0434 \u0441\u0442\u043e\u0438\u0442 \u043f\u043e\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u2013 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 TheXTech<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-1\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u0417\u0434\u043e\u0440\u043e\u0432\u043e, \u043a\u043e\u0433\u0434\u0430 \u044d\u043d\u0442\u0443\u0437\u0438\u0430\u0441\u0442\u0430\u043c-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430\u043c \u0443\u0434\u0430\u0451\u0442\u0441\u044f \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0449\u0438\u0439 \u043a\u043b\u043e\u043d \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u043e\u0439 \u0438\u0433\u0440\u044b. \u0415\u0449\u0451 \u043b\u0443\u0447\u0448\u0435, \u043a\u043e\u0433\u0434\u0430 \u043d\u0430\u0445\u043e\u0434\u044f\u0442\u0441\u044f \u043b\u044e\u0434\u0438, \u0433\u043e\u0442\u043e\u0432\u044b\u0435 \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u0442\u044c \u0440\u0430\u0437\u0432\u0438\u0442\u0438\u0435 \u0442\u0430\u043a\u0438\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432! \u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e PVS-Studio \u043c\u044b \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u043c TheXTech \u2013 \u043e\u0442\u043a\u0440\u044b\u0442\u0443\u044e \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u0438\u0433\u0440\u044b \u043f\u043e \u0432\u0441\u0435\u043b\u0435\u043d\u043d\u043e\u0439 Super Mario.<\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/post_images\/aed\/64f\/bd0\/aed64fbd090d7b6ccda41548ad61ec87.png\" alt=\"0889_TheXTech_ru\/image1.png\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/aed\/64f\/bd0\/aed64fbd090d7b6ccda41548ad61ec87.png\"\/><\/p>\n<p><a name=\"habracut\"><\/a>  <\/p>\n<h2 id=\"o-proekte\">\u041e \u043f\u0440\u043e\u0435\u043a\u0442\u0435<\/h2>\n<p>  <\/p>\n<p><a href=\"https:\/\/github.com\/Wohlstand\/TheXTech\">TheXTech<\/a> \u2013 \u044d\u0442\u043e \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u043f\u0435\u0440\u0435\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0439 \u043d\u0430 C++ \u0438\u0433\u0440\u043e\u0432\u043e\u0439 \u0434\u0432\u0438\u0436\u043e\u043a SMBX 1.3. \u041e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u044b\u0439 <a href=\"https:\/\/github.com\/smbx\/smbx-legacy-source\">SMBX<\/a> (Super Mario Bros. X) \u0431\u044b\u043b \u043d\u0430\u043f\u0438\u0441\u0430\u043d \u043d\u0430 Visual Basic 6 \u042d\u043d\u0434\u0440\u044e \u0421\u043f\u0438\u043d\u043a\u0441\u043e\u043c \u0432 2009 \u0433\u043e\u0434\u0443. \u041e\u043d \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u043b \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0443\u0440\u043e\u0432\u043d\u0438 \u0438\u0437 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u0438\u0433\u0440 Nintendo \u0441\u0435\u0440\u0438\u0438 Super Mario Bros. TheXTech \u0443\u043c\u0435\u0435\u0442 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0442\u043e\u0447\u043d\u043e \u0432\u043e\u0441\u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u044c \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u0430 \u0441 \u043e\u043f\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u043c\u044b\u043c\u0438 \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f\u043c\u0438 \u0435\u0433\u043e \u0431\u0430\u0433\u043e\u0432. \u041c\u043e\u0436\u0435\u0442 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c\u0441\u044f \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u0434 Windows, \u043d\u043e \u0438 \u043d\u0430 macOS, Linux-\u0441\u0438\u0441\u0442\u0435\u043c\u0430\u0445 \u0441 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u0430\u043c\u0438 x86, ARM \u0438\u043b\u0438 PowerPC, \u0442\u0430\u043a\u0436\u0435 \u0435\u0433\u043e \u043f\u043e\u0440\u0442\u0438\u0440\u0443\u044e\u0442 \u043d\u0430 3DS \u0438 PS Vita.<\/p>\n<p>  <\/p>\n<p>\u0420\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a TheXTech \u2013 \u0412\u0438\u0442\u0430\u043b\u0438\u0439 \u041d\u043e\u0432\u0438\u0447\u043a\u043e\u0432 (Wohlstand) \u2013 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u043e\u043f\u0438\u0441\u0430\u043b \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043d\u0430 <a href=\"https:\/\/habr.com\/ru\/post\/582566\/\">\u0425\u0430\u0431\u0440\u0435<\/a> \u0438 \u0442\u043e, \u043a\u0430\u043a\u0438\u0435 \u0442\u0435\u0445\u043d\u0438\u043a\u0438 \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u043b\u044f \u0441\u0433\u043b\u0430\u0436\u0438\u0432\u0430\u043d\u0438\u044f \u0440\u0430\u0437\u043b\u0438\u0447\u0438\u0439 \u043f\u0440\u0438 \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0435 \u0441 \u044f\u0437\u044b\u043a\u0430 VB6 \u043d\u0430 C++. \u041d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435 GitHub \u043e\u043f\u0443\u0431\u043b\u0438\u043a\u043e\u0432\u0430\u043d <a href=\"https:\/\/github.com\/Wohlstand\/TheXTech\/blob\/d07a7ce1c9582084cf118d185f41a1eafef9e4cd\/README.RUS.md\">\u0434\u0438\u0441\u043a\u043b\u0435\u0439\u043c\u0435\u0440<\/a> (<a href=\"https:\/\/github.com\/Wohlstand\/TheXTech\/blob\/d07a7ce1c9582084cf118d185f41a1eafef9e4cd\/README.md\">\u0430\u043d\u0433\u043b<\/a>), \u043f\u043e\u044f\u0441\u043d\u044f\u044e\u0449\u0438\u0439, \u043f\u043e\u0447\u0435\u043c\u0443 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u043d\u0435 \u0432 \u0441\u0430\u043c\u043e\u043c \u043b\u0443\u0447\u0448\u0435\u043c \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0438: \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0438\u0437 \u043b\u044e\u0442\u043e\u0433\u043e \u0441\u043f\u0430\u0433\u0435\u0442\u0442\u0438-\u043a\u043e\u0434\u0430, \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u044b \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043c\u044b \u0441\u0435\u0439\u0447\u0430\u0441 \u0438 \u0443\u0432\u0438\u0434\u0438\u043c.<\/p>\n<p>  <\/p>\n<h2 id=\"rezultaty-proverki\">\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438<\/h2>\n<p>  <\/p>\n<h3 id=\"chistka-koda\">\u0427\u0438\u0441\u0442\u043a\u0430 \u043a\u043e\u0434\u0430<\/h3>\n<p>  <\/p>\n<p><strong>\u0424\u0440\u0430\u0433\u043c\u0435\u043d\u0442 N1<\/strong><\/p>\n<p>  <\/p>\n<p>\u0418\u0442\u0430\u043a, \u043c\u043e\u0436\u043d\u043e \u043b\u0438 \u0437\u0434\u0435\u0441\u044c \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u043e\u0448\u0438\u0431\u043a\u0443, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043d\u0430\u0448\u0451\u043b \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440?<\/p>\n<p>  <\/p>\n<p><a href=\"https:\/\/pvs-studio.com\/ru\/w\/v547\/\">V547<\/a> Expression &#8216;NPC[A].Type == 54 &amp;&amp; NPC[A].Type == 15&#8217; is always false. Probably the &#8216;||&#8217; operator should be used here. thextech npc_update.cpp 1277<\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/post_images\/529\/902\/b3d\/529902b3dbbc01528de9c01495a03092.png\" alt=\"0889_TheXTech_ru\/image3.png\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/529\/902\/b3d\/529902b3dbbc01528de9c01495a03092.png\"\/><\/p>\n<p>  <\/p>\n<p>\u041a\u043e\u043d\u0435\u0447\u043d\u043e \u0436\u0435, \u043d\u0435\u0442 \ud83d\ude42 \u041e\u043d\u0430 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u043f\u043e\u0441\u0440\u0435\u0434\u0438 \u0441\u0442\u0440\u043e\u043a\u0438 \u0441 \u0443\u0441\u043b\u043e\u0432\u0438\u0435\u043c \u0434\u043b\u0438\u043d\u043e\u0439 1400 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432, \u0438 \u0432\u0430\u043c \u043f\u0440\u0438\u0434\u0451\u0442\u0441\u044f \u043f\u0440\u043e\u043b\u0438\u0441\u0442\u0430\u0442\u044c 5 \u044d\u043a\u0440\u0430\u043d\u043e\u0432 \u0432\u043f\u0440\u0430\u0432\u043e \u0447\u0442\u043e\u0431\u044b \u0434\u043e \u043d\u0435\u0451 \u0434\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f. \u041f\u0435\u0440\u0435\u0444\u043e\u0440\u043c\u0430\u0442\u0438\u0440\u0443\u0435\u043c \u043a\u043e\u0434 \u0434\u043b\u044f \u043d\u0430\u0433\u043b\u044f\u0434\u043d\u043e\u0441\u0442\u0438:<\/p>\n<p>  <\/p>\n<pre><code class=\"cpp\">else if(      NPC[A].Type == 21 || NPC[A].Type == 22 || NPC[A].Type == 25   || NPC[A].Type == 26 || NPC[A].Type == 31 || NPC[A].Type == 32   || NPC[A].Type == 238 || NPC[A].Type == 239 || NPC[A].Type == 35   || NPC[A].Type == 191 || NPC[A].Type == 193   || (NPC[A].Type == 40 &amp;&amp; NPC[A].Projectile == true) || NPC[A].Type == 49   || NPC[A].Type == 58 || NPC[A].Type == 67 || NPC[A].Type == 68   || NPC[A].Type == 69 || NPC[A].Type == 70   || (NPCIsVeggie[NPC[A].Type] &amp;&amp; NPC[A].Projectile == false)   || (NPC[A].Type == 29 &amp;&amp; NPC[A].Projectile == true)    ||    (NPC[A].Projectile == true      &amp;&amp; (NPC[A].Type == 54 &amp;&amp; NPC[A].Type == 15))            \/\/ &lt;=    || .... ) { .... }<\/code><\/pre>\n<p>  <\/p>\n<p>\u0420\u0430\u0437\u0443\u043c\u0435\u0435\u0442\u0441\u044f, \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f <em>NPC[A].Type<\/em> \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u043e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e \u0440\u0430\u0432\u043d\u044f\u0442\u044c\u0441\u044f \u0434\u0432\u0443\u043c \u0440\u0430\u0437\u043d\u044b\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u043c. \u041f\u043e \u0432\u0441\u0435\u0439 \u0432\u0438\u0434\u0438\u043c\u043e\u0441\u0442\u0438, \u043b\u043e\u0433\u0438\u043a\u0430 \u0443\u0441\u043b\u043e\u0432\u0438\u044f \u0434\u043e\u043b\u0436\u043d\u0430 \u0431\u044b\u043b\u0430 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c\u0441\u044f \u0432 \u0442\u043e\u043c \u0447\u0438\u0441\u043b\u0435 \u0438 \u0434\u043b\u044f \u0441\u043d\u0430\u0440\u044f\u0434\u043e\u0432 \u0441 \u0442\u0438\u043f\u0430\u043c\u0438 54 \u0438 15, \u043d\u043e \u0441\u0435\u0439\u0447\u0430\u0441 \u044d\u0442\u0430 \u0447\u0430\u0441\u0442\u044c \u0443\u0441\u043b\u043e\u0432\u0438\u044f \u0432\u0441\u0435\u0433\u0434\u0430 \u043b\u043e\u0436\u043d\u0430. \u041f\u043e \u0432\u0441\u0435\u0439 \u0432\u0438\u0434\u0438\u043c\u043e\u0441\u0442\u0438, \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u043c\u0435\u043d\u044f\u0442\u044c \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e <em>\u0418<\/em> \u043d\u0430 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e <em>\u0418\u041b\u0418<\/em> \u043b\u0438\u0431\u043e \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u044d\u0442\u0443 \u0447\u0430\u0441\u0442\u044c \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f.<\/p>\n<p>  <\/p>\n<p>\u0415\u0449\u0451 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u0432 \u043e\u0448\u0438\u0431\u043e\u043a \u0432 \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u0434\u043b\u0438\u043d\u043d\u044b\u0445 \u0441\u0442\u0440\u043e\u043a\u0430\u0445:<\/p>\n<p>  <\/p>\n<ul>\n<li><a href=\"https:\/\/pvs-studio.com\/ru\/w\/v501\/\">V501<\/a> There are identical sub-expressions &#8216;NPC[A].Type == 193&#8217; to the left and to the right of the &#8216;||&#8217; operator. thextech npc_update.cpp 996<\/li>\n<li>V501 There are identical sub-expressions &#8216;NPC[A].Type == 193&#8217; to the left and to the right of the &#8216;||&#8217; operator. thextech npc_update.cpp 1033<\/li>\n<li>V501 There are identical sub-expressions &#8216;NPC[A].Type != 191&#8217; to the left and to the right of the &#8216;&amp;&amp;&#8217; operator. thextech npc_update.cpp 2869<\/li>\n<li><a href=\"https:\/\/pvs-studio.com\/ru\/w\/v547\/\">V547<\/a> Expression &#8216;NPC[A].Type == 54 &amp;&amp; NPC[A].Type == 15&#8217; is always false. Probably the &#8216;||&#8217; operator should be used here. thextech npc_update.cpp 1277<\/li>\n<\/ul>\n<p>  <\/p>\n<p><strong>\u0424\u0440\u0430\u0433\u043c\u0435\u043d\u0442 N2<\/strong><\/p>\n<p>  <\/p>\n<p>\u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442 \u043a\u043e\u0434\u0430 \u0443\u0436\u0435 \u0431\u044b\u043b \u0444\u043e\u0440\u043c\u0430\u0442\u0438\u0440\u043e\u0432\u0430\u043d \u0434\u043b\u044f \u0447\u0442\u0435\u043d\u0438\u044f \u0447\u0435\u043b\u043e\u0432\u0435\u043a\u043e\u043c. \u0412\u043f\u0440\u043e\u0447\u0435\u043c, \u043d\u0435\u0441\u043c\u043e\u0442\u0440\u044f \u043d\u0430 \u0431\u043e\u043b\u044c\u0448\u0438\u0439 \u0448\u0430\u043d\u0441 \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u044c \u0437\u0434\u0435\u0441\u044c \u043e\u0448\u0438\u0431\u043a\u0438, \u043e\u043d\u0438 \u043e\u0441\u0442\u0430\u043b\u0438\u0441\u044c. \u041f\u0440\u0438\u0447\u0451\u043c \u0432 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0435 4 \u0448\u0442\u0443\u043a:<\/p>\n<p>  <\/p>\n<ul>\n<li><a href=\"https:\/\/pvs-studio.com\/ru\/w\/v501\/\">V501<\/a> There are identical sub-expressions &#8216;n.Type == 159&#8217; to the left and to the right of the &#8216;||&#8217; operator. thextech menu_loop.cpp 324<\/li>\n<li>V501 There are identical sub-expressions &#8216;n.Type == 160&#8217; to the left and to the right of the &#8216;||&#8217; operator. thextech menu_loop.cpp 324<\/li>\n<li>V501 There are identical sub-expressions &#8216;n.Type == 164&#8217; to the left and to the right of the &#8216;||&#8217; operator. thextech menu_loop.cpp 324<\/li>\n<li>V501 There are identical sub-expressions &#8216;n.Type == 197&#8217; to the left and to the right of the &#8216;||&#8217; operator. thextech menu_loop.cpp 324<\/li>\n<\/ul>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/post_images\/0d9\/9d1\/be3\/0d99d1be3f3fd99042bdd50ef659ab40.png\" alt=\"0889_TheXTech_ru\/image5.png\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/0d9\/9d1\/be3\/0d99d1be3f3fd99042bdd50ef659ab40.png\"\/><\/p>\n<p>  <\/p>\n<p>\u0417\u0434\u0435\u0441\u044c \u043d\u0435\u0442 \u0441\u043c\u044b\u0441\u043b\u0430 \u0434\u0432\u0430\u0436\u0434\u044b \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0442\u044c \u043e\u0434\u043d\u0438 \u0438 \u0442\u0435 \u0436\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0438 \u043b\u0438\u0448\u043d\u0438\u0435 \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f \u043c\u043e\u0436\u043d\u043e \u0443\u0434\u0430\u043b\u0438\u0442\u044c.<\/p>\n<p>  <\/p>\n<p>\u0414\u0430\u043b\u0435\u0435 \u043c\u043e\u0436\u043d\u043e \u043e\u0431\u043e\u0439\u0442\u0438\u0441\u044c \u0431\u0435\u0437 \u0441\u043a\u0440\u0438\u043d\u0448\u043e\u0442\u043e\u0432.<\/p>\n<p>  <\/p>\n<p><strong>\u0424\u0440\u0430\u0433\u043c\u0435\u043d\u0442 N3<\/strong><\/p>\n<p>  <\/p>\n<p><a href=\"https:\/\/pvs-studio.com\/ru\/w\/v501\/\">V501<\/a> There are identical sub-expressions &#8216;(evt.AutoSection) >= (0)&#8217; to the left and to the right of the &#8216;&amp;&amp;&#8217; operator. thextech layers.cpp 568<\/p>\n<p>  <\/p>\n<pre><code class=\"cpp\">#define IF_INRANGE(x, l, r)  ((x) >= (l) &amp;&amp; (x) &lt;= (r))  else if(  IF_INRANGE(evt.AutoSection, 0, maxSections)        &amp;&amp; IF_INRANGE(evt.AutoSection, 0, maxEvents)) {   \/\/ Buggy behavior, see https:\/\/github.com\/Wohlstand\/TheXTech\/issues\/44   AutoX[evt.AutoSection] = Events[evt.AutoSection].AutoX;   AutoY[evt.AutoSection] = Events[evt.AutoSection].AutoY; }<\/code><\/pre>\n<p>  <\/p>\n<p>\u0412 \u044d\u0442\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u0441\u043c\u0443\u0442\u0438\u043b\u043e \u0434\u0443\u0431\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0439, \u043f\u043e\u043b\u0443\u0447\u0438\u0432\u0448\u0435\u0435\u0441\u044f \u0432 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u0440\u0430\u0441\u043a\u0440\u044b\u0442\u0438\u044f \u043c\u0430\u043a\u0440\u043e\u0441\u043e\u0432:<\/p>\n<p>  <\/p>\n<pre><code class=\"cpp\">((evt.AutoSection) >= (0) &amp;&amp; (evt.AutoSection) &lt;= (maxSections)) &amp;&amp; ((evt.AutoSection) >= (0) &amp;&amp; (evt.AutoSection) &lt;= (maxEvents))<\/code><\/pre>\n<p>  <\/p>\n<p>\u041f\u043e\u0434\u043e\u0431\u043d\u044b\u0435 \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043d\u0438\u044f \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0434\u0430\u0432\u043b\u044f\u0442\u044c \u0438\u043b\u0438 \u043f\u0435\u0440\u0435\u043f\u0438\u0441\u0430\u0442\u044c \u0443\u0441\u043b\u043e\u0432\u0438\u0435 \u043a\u0430\u043a-\u0442\u043e \u0442\u0430\u043a:<\/p>\n<p>  <\/p>\n<pre><code class=\"cpp\">IF_INRANGE(evt.AutoSection, 0, min(maxSections, maxEvents))<\/code><\/pre>\n<p>  <\/p>\n<p>\u0422\u0430\u043a\u0436\u0435 \u043d\u0430 \u044d\u0442\u0443 \u0441\u0442\u0440\u043e\u043a\u0443 \u0441\u0440\u0430\u0431\u043e\u0442\u0430\u043b\u0430 \u0434\u0438\u0430\u0433\u043d\u043e\u0441\u0442\u0438\u043a\u0430 V590.<\/p>\n<p>  <\/p>\n<p><a href=\"https:\/\/pvs-studio.com\/ru\/w\/v590\/\">V590<\/a> Consider inspecting this expression. The expression is excessive or contains a misprint. thextech layers.cpp 568<\/p>\n<p>  <\/p>\n<p>\u0423\u0441\u0442\u0440\u0430\u043d\u0435\u043d\u0438\u0435 \u044d\u0442\u0438\u0445 \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0439 \u043d\u0435 \u0438\u0441\u043f\u0440\u0430\u0432\u0438\u0442 \u043a\u0430\u043a\u0438\u0435-\u0442\u043e \u0431\u0430\u0433\u0438, \u0430 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u044b \u0438 \u0442\u0430\u043a \u043c\u043e\u0433\u0443\u0442 \u043f\u043e\u0437\u0430\u0431\u043e\u0442\u0438\u0442\u044c\u0441\u044f \u043e \u0432\u044b\u0440\u0435\u0437\u0430\u043d\u0438\u0438 \u043b\u0438\u0448\u043d\u0438\u0445 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0439, \u043d\u043e \u0442\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043c\u043e\u0447\u044c \u043f\u043e\u0447\u0438\u0441\u0442\u0438\u0442\u044c \u043a\u043e\u0434.<\/p>\n<p>  <\/p>\n<p>\u041d\u0430 \u043c\u043e\u0439 \u0432\u0437\u0433\u043b\u044f\u0434, \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 \u0432 <a href=\"https:\/\/github.com\/Wohlstand\/TheXTech\/issues\/44\">issues<\/a> \u0438\u0437 \u0441\u0441\u044b\u043b\u043a\u0438 \u0432 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0438 \u0438\u0437 \u043f\u0440\u0438\u043c\u0435\u0440\u0430. \u0422\u0430\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0441 \u043d\u0438\u043a\u043e\u043c ds-sloth \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0438\u043b \u0438\u0441\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u0441\u0442\u0440\u043e\u0447\u043a\u0443:<\/p>\n<p>  <\/p>\n<pre><code class=\"cpp\">AutoX[Events[A].AutoSection] = Events[Events[A].AutoSection].AutoX;<\/code><\/pre>\n<p>  <\/p>\n<p>\u043d\u0430<\/p>\n<p>  <\/p>\n<pre><code class=\"cpp\">AutoX[Events[A].AutoSection] = Events[A].AutoX;<\/code><\/pre>\n<p>  <\/p>\n<p>\u042d\u0442\u043e \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0447\u0438\u043d\u0438\u0442 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0430\u0432\u0442\u043e\u043f\u0440\u043e\u043a\u0440\u0443\u0442\u043a\u043e\u0439 \u0443\u0440\u043e\u0432\u043d\u044f \u0447\u0435\u0440\u0435\u0437 \u0432\u043d\u0443\u0442\u0440\u0438\u0438\u0433\u0440\u043e\u0432\u044b\u0435 \u0441\u043e\u0431\u044b\u0442\u0438\u044f:<\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/50c\/4cf\/42a\/50c4cf42a49e818821fa121770b56376.gif\" alt=\"0889_TheXTech_ru\/image7.gif\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/50c\/4cf\/42a\/50c4cf42a49e818821fa121770b56376.gif\"\/><\/p>\n<p>  <\/p>\n<p>\u041e\u0434\u043d\u0430\u043a\u043e \u044d\u0442\u043e\u0442 \u0444\u0438\u043a\u0441 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u043e\u0441\u0442\u0430\u043b\u0441\u044f \u0432 \u0432\u044b\u043a\u043b\u044e\u0447\u0435\u043d\u043d\u043e\u043c \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0438, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043c\u0435\u043d\u044f\u0435\u0442 \u0438\u043b\u0438 \u043b\u043e\u043c\u0430\u0435\u0442 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u043e\u0435 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u0438\u0433\u0440\u044b:<\/p>\n<p>  <\/p>\n<blockquote><p><strong>Wohlstand<\/strong>: I guess the fix of this bug doesn&#8217;t break levels that intended to work it, but breaks level that contains an absolutely invalid data and didn&#8217;t intended to auto-scroll at all (knowing it was broken), in the result the issue #65. I guess since the 38A&#8217;s per-section auto-scroll setup was utilized, when I will implement the way at PGE Editor to set them, I&#8217;ll set this autoscrolling compat.ini value into &#8216;false&#8217; by default.<\/p>\n<p>  <strong>Wohlstand<\/strong>: Okay, I had to set the auto-scroll fix into &#8216;false&#8217;, mainly because there are several faulty levels that kept bad auto-scroll data after unsuccess experiments done by users, they making much more pain than proper use of this thing.<\/p><\/blockquote>\n<p>\u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0441\u043b\u0443\u0447\u0430\u044f\u0445 \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043e\u0448\u0438\u0431\u043e\u043a, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440, \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u043e\u0431\u0434\u0443\u043c\u044b\u0432\u0430\u043d\u0438\u044f, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u044d\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u043d\u0430\u0440\u0443\u0448\u0438\u0442\u044c <a href=\"https:\/\/en.wikipedia.org\/wiki\/Bug_compatibility\">\u0431\u0430\u0433\u043e\u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u043e\u0441\u0442\u044c<\/a> :), \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0432 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0445 \u043f\u0440\u0438\u043c\u0435\u0440\u0430\u0445.<\/p>\n<p>  <\/p>\n<p><strong>\u0424\u0440\u0430\u0433\u043c\u0435\u043d\u0442 N4<\/strong><\/p>\n<p>  <\/p>\n<p><a href=\"https:\/\/pvs-studio.com\/ru\/w\/v501\/\">V501<\/a> There are identical sub-expressions to the left and to the right of the &#8216;!=&#8217; operator: NPC[A].Projectile != NPC[A].Projectile thextech npc_hit.cpp 2105<\/p>\n<p>  <\/p>\n<pre><code class=\"cpp\">else if (  NPC[A].Location.SpeedX != oldNPC.Location.SpeedX         || NPC[A].Location.SpeedY != oldNPC.Location.SpeedY         || NPC[A].Projectile != NPC[A].Projectile  \/\/ &lt;=         || NPC[A].Killed != oldNPC.Killed         || NPC[A].Type != oldNPC.Type         || NPC[A].Inert != oldNPC.Inert) { .... }<\/code><\/pre>\n<p>  <\/p>\n<p>\u0412 \u044d\u0442\u043e\u043c \u0443\u0441\u043b\u043e\u0432\u0438\u0438 \u0441\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043d\u0430\u0431\u043e\u0440 \u043f\u043e\u043b\u0435\u0439 \u043c\u0435\u0436\u0434\u0443 \u043e\u0431\u044a\u0435\u043a\u0442\u0430\u043c\u0438 <em>NPC[A]<\/em> \u0438 <em>oldNPC<\/em>. \u041f\u043e\u0441\u0435\u0440\u0435\u0434\u0438\u043d\u0435 \u043f\u043e\u043b\u0435 <em>Projectile<\/em> \u0441\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0443 <em>NPC[A]<\/em> \u0441\u0430\u043c\u043e \u0441 \u0441\u043e\u0431\u043e\u0439. \u041e\u0447\u0435\u043d\u044c \u043f\u043e\u0445\u043e\u0436\u0435 \u043d\u0430 \u043d\u0435\u0430\u043a\u043a\u0443\u0440\u0430\u0442\u043d\u044b\u0439 \u043a\u043e\u043f\u0438\u043f\u0430\u0441\u0442. \u041a\u043b\u0430\u0441\u0441\u0438\u043a\u0430. \u041e\u0434\u043d\u0430\u043a\u043e, \u043a \u0447\u0435\u043c\u0443 \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0438\u0432\u0435\u0441\u0442\u0438 \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u044d\u0442\u043e\u0433\u043e \u0443\u0441\u043b\u043e\u0432\u0438\u044f, \u043c\u043e\u0436\u043d\u043e \u0443\u0437\u043d\u0430\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0438\u043b\u0438 \u043f\u043e\u043b\u043d\u044b\u043c \u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u0435\u043c \u0438\u0433\u0440\u043e\u0432\u043e\u0439 \u043b\u043e\u0433\u0438\u043a\u0438. \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u0442\u0430\u043c \u043f\u0440\u043e\u0441\u0442\u043e \u043b\u0438\u0448\u043d\u044f\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430.<\/p>\n<p>  <\/p>\n<p>\u0410\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u0430\u044f \u043e\u0448\u0438\u0431\u043a\u0430:<\/p>\n<p>  <\/p>\n<ul>\n<li>V501 There are identical sub-expressions to the left and to the right of the &#8216;!=&#8217; operator: NPC[A].Projectile != NPC[A].Projectile thextech npc_hit.cpp 2129<\/li>\n<\/ul>\n<p>  <\/p>\n<p><strong>\u0424\u0440\u0430\u0433\u043c\u0435\u043d\u0442 N5<\/strong><\/p>\n<p>  <\/p>\n<p>\u0418 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u044f\u044f \u043d\u0430 \u0441\u0435\u0433\u043e\u0434\u043d\u044f \u043e\u0448\u0438\u0431\u043a\u0430 V501:<\/p>\n<p>  <\/p>\n<p><a href=\"https:\/\/pvs-studio.com\/ru\/w\/v501\/\">V501<\/a> There are identical sub-expressions &#8216;MenuMode == MENU_SELECT_SLOT_1P_DELETE&#8217; to the left and to the right of the &#8216;||&#8217; operator. thextech menu_main.cpp 1004<\/p>\n<p>  <\/p>\n<pre><code class=\"cpp\">\/\/ Delete gamesave else if(  MenuMode == MENU_SELECT_SLOT_1P_DELETE        || MenuMode == MENU_SELECT_SLOT_1P_DELETE) {   if(MenuMouseMove)     s_handleMouseMove(2, 300, 350, 300, 30); ....<\/code><\/pre>\n<p>  <\/p>\n<p>\u0417\u0434\u0435\u0441\u044c \u043d\u0435 \u0441\u043e\u0432\u0441\u0435\u043c \u043f\u043e\u043d\u044f\u0442\u043d\u043e, \u0434\u043e\u043b\u0436\u043d\u043e \u043b\u0438 \u043f\u0440\u0430\u0432\u043e \u0443\u0434\u0430\u043b\u044f\u0442\u044c \u0441\u043b\u043e\u0442 \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0431\u044b\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0443 \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u0438\u0433\u0440\u043e\u043a\u0430. \u0412 \u0442\u0430\u043a\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043d\u0430 MENU_SELECT_SLOT_1P_DELETE \u0437\u0434\u0435\u0441\u044c \u043b\u0438\u0448\u043d\u044f\u044f. \u041a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u0430 MENU_SELECT_SLOT_2P_DELETE \u0432 \u043a\u043e\u0434\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u0438, \u043c\u043e\u0436\u0435\u0442, \u043e\u043d\u0430 \u0434\u043e\u043b\u0436\u043d\u0430 \u0431\u044b\u043b\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0432 \u043f\u0440\u0430\u0432\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f.<\/p>\n<p>  <\/p>\n<p>\u0427\u0443\u0442\u044c \u043d\u0438\u0436\u0435 \u0432 \u0431\u043b\u043e\u043a\u0435 \u044d\u0442\u043e\u0433\u043e \u0443\u0441\u043b\u043e\u0432\u0438\u044f \u0435\u0441\u0442\u044c \u0442\u0430\u043a\u043e\u0435 \u0436\u0435 \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043d\u0438\u0435:<\/p>\n<p>  <\/p>\n<ul>\n<li>V501 There are identical sub-expressions &#8216;MenuMode == MENU_SELECT_SLOT_1P_DELETE&#8217; to the left and to the right of the &#8216;||&#8217; operator. thextech menu_main.cpp 1004<\/li>\n<\/ul>\n<p>  <\/p>\n<h3 id=\"problemy-s-uslovnymi-operatorami\">\u041f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0441 \u0443\u0441\u043b\u043e\u0432\u043d\u044b\u043c\u0438 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u0430\u043c\u0438<\/h3>\n<p>  <\/p>\n<p><strong>\u0424\u0440\u0430\u0433\u043c\u0435\u043d\u0442 N6<\/strong><\/p>\n<p>  <\/p>\n<p><a href=\"https:\/\/pvs-studio.com\/ru\/w\/v517\/\">V517<\/a> The use of &#8216;if (A) {&#8230;} else if (A) {&#8230;}&#8217; pattern was detected. There is a probability of logical error presence. Check lines: 1561, 1570. thextech player_update.cpp 1561<\/p>\n<p>  <\/p>\n<pre><code class=\"cpp\">if(Player[A].Character == 2) \/\/ luigi doesn't fly as long as mario   Player[A].FlyCount = 300; \/\/ Length of flight time else if(Player[A].Character == 3) \/\/ special handling for peach {   Player[A].FlyCount = 0;   Player[A].RunCount = 80;   Player[A].CanFly2 = false;   Player[A].Jump = 70;   Player[A].CanFloat = true;   Player[A].FlySparks = true; } else if(Player[A].Character == 3) \/\/ special handling for peach   Player[A].FlyCount = 280; \/\/ Length of flight time else   Player[A].FlyCount = 320; \/\/ Length of flight time<\/code><\/pre>\n<p>  <\/p>\n<p>\u0412 \u044d\u0442\u043e\u043c \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u0435 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u044e\u0442 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0439 <em>else-if<\/em> \u0441 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u043c \u0443\u0441\u043b\u043e\u0432\u0438\u0435\u043c (<em>Player[A].Character == 3<\/em>). \u042d\u0442\u043e \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442 \u043a \u043d\u0435\u0434\u043e\u0441\u0442\u0438\u0436\u0438\u043c\u043e\u043c\u0443 \u043a\u043e\u0434\u0443 \u0432\u043e \u0432\u0442\u043e\u0440\u043e\u0439 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438 <em>else-if<\/em>. \u041f\u043e\u0445\u043e\u0436\u0435 \u043d\u0430 \u0442\u043e, \u0447\u0442\u043e \u044d\u0442\u043e\u0442 \u043a\u043e\u0434 \u043d\u0435 \u0434\u0430\u0451\u0442 \u043f\u0440\u0438\u043d\u0446\u0435\u0441\u0441\u0435 \u041f\u0438\u0447 \u043b\u0435\u0442\u0430\u0442\u044c \u0432 \u043a\u0430\u043a\u0438\u0445-\u0442\u043e \u0441\u043b\u0443\u0447\u0430\u044f\u0445. \u0421\u0442\u043e\u0438\u0442 \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c \u0443\u0431\u0440\u0430\u0442\u044c \u043b\u0438\u0448\u043d\u044e\u044e \u0432\u0435\u0442\u043a\u0443 \u0438 \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u0440\u0438\u0441\u0432\u043e\u0438\u0442\u044c \u0447\u0438\u0441\u043b\u043e 280 \u0432 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e <em>Player[A].FlyCount<\/em>.<\/p>\n<p>  <\/p>\n<p><strong>\u0424\u0440\u0430\u0433\u043c\u0435\u043d\u0442 N7<\/strong><\/p>\n<p>  <\/p>\n<p>\u0412 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u043f\u043e\u0434\u043e\u0437\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u0434\u0443\u0431\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043a\u043e\u0434\u0430 \u0432 <em>then<\/em> \u0438 <em>else<\/em> \u0432\u0435\u0442\u043a\u0430\u0445 \u0443\u0441\u043b\u043e\u0432\u0438\u044f:<\/p>\n<p>  <\/p>\n<p><a href=\"https:\/\/pvs-studio.com\/ru\/w\/v523\/\">V523<\/a> The &#8216;then&#8217; statement is equivalent to the &#8216;else&#8217; statement. thextech npc_hit.cpp 1546<\/p>\n<p>  <\/p>\n<pre><code class=\"cpp\">if(NPC[C].Projectile &amp;&amp; !(NPC[C].Type >= 117 &amp;&amp; NPC[C].Type &lt;= 120)) {   if(!(NPC[A].Type == 24 &amp;&amp; NPC[C].Type == 13))     NPC[A].Killed = B;   else     NPC[A].Killed = B; }<\/code><\/pre>\n<p>  <\/p>\n<p>\u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u0437\u0434\u0435\u0441\u044c \u043d\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043a\u0430\u043a\u043e\u0435-\u0442\u043e \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0435 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043f\u0440\u0438 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0438, \u043c\u043e\u0436\u0435\u0442 \u043b\u0438 \u0441\u043d\u0430\u0440\u044f\u0434 \u0443\u0431\u0438\u0442\u044c NPC \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0433\u043e \u0442\u0438\u043f\u0430.<\/p>\n<p>  <\/p>\n<p><strong>\u0424\u0440\u0430\u0433\u043c\u0435\u043d\u0442 N8<\/strong><\/p>\n<p>  <\/p>\n<p>\u0412 \u043e\u0434\u043d\u043e\u043c \u0438\u0437 \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043d\u0438\u0439 \u043f\u043e\u043f\u0430\u043b\u043e\u0441\u044c \u043d\u0435\u0432\u044b\u043f\u043e\u043b\u043d\u0438\u043c\u043e\u0435 \u0443\u0441\u043b\u043e\u0432\u0438\u0435:<\/p>\n<p>  <\/p>\n<p><a href=\"https:\/\/pvs-studio.com\/ru\/w\/v547\/\">V547<\/a> Expression &#8216;A == 48&#8217; is always false. thextech effect.cpp 1652<\/p>\n<p>  <\/p>\n<pre><code class=\"cpp\">else if(A == 16) \/\/ Dead Giant Bullet Bill {   numEffects++;   Effect[numEffects].Shadow = Shadow;   ....   Effect[numEffects].Location.SpeedY = Location.SpeedY;   Effect[numEffects].Location.SpeedX = Location.SpeedX;   if(A == 48)                                          \/\/ &lt;=     Effect[numEffects].Location.SpeedY = -8;   Effect[numEffects].Life = 120;   Effect[numEffects].Type = A; }<\/code><\/pre>\n<p>  <\/p>\n<p>\u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0432 \u044d\u0442\u043e\u0442 \u0431\u043b\u043e\u043a \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u043c\u043e\u0436\u0435\u0442 \u0437\u0430\u0439\u0442\u0438, \u0442\u043e\u043b\u044c\u043a\u043e \u0435\u0441\u043b\u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f <em>A<\/em> \u0440\u0430\u0432\u043d\u0430 16, \u0443\u0441\u043b\u043e\u0432\u0438\u0435 &#8216;<em>A == 48<\/em>&#8216; \u043d\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u0441\u044f. \u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u0443 \u044d\u0444\u0444\u0435\u043a\u0442\u0430 \u0431\u0443\u0434\u0435\u0442 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0430 \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u0430\u044f \u0432\u0435\u0440\u0442\u0438\u043a\u0430\u043b\u044c\u043d\u0430\u044f \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c, \u0438 \u0413\u0438\u0433\u0430\u043d\u0442\u0441\u043a\u0438\u0439 \u041f\u0443\u043b\u044f \u0411\u0438\u043b\u043b \u043f\u043e\u0433\u0438\u0431\u043d\u0435\u0442 \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0434\u0440\u0430\u043c\u0430\u0442\u0438\u0447\u043d\u043e \ud83d\ude42<\/p>\n<p>  <\/p>\n<p><strong>\u0424\u0440\u0430\u0433\u043c\u0435\u043d\u0442 N9<\/strong><\/p>\n<p>  <\/p>\n<p>\u0415\u0449\u0451 \u043e\u0434\u0438\u043d \u043f\u0440\u0438\u043c\u0435\u0440 \u0431\u0435\u0441\u043f\u043e\u043b\u0435\u0437\u043d\u043e\u0433\u043e \u0443\u0441\u043b\u043e\u0432\u043d\u043e\u0433\u043e \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u0430:<\/p>\n<p>  <\/p>\n<p><a href=\"https:\/\/pvs-studio.com\/ru\/w\/v547\/\">V547<\/a> Expression &#8216;tempPlayer == 0&#8217; is always true. thextech blocks.cpp 576<\/p>\n<p>  <\/p>\n<pre><code class=\"cpp\">\/\/ don't spawn players from blocks anymore tempPlayer = 0; if(tempPlayer == 0) \/\/ Spawn the npc {   numNPCs++; \/\/ create a new NPC   NPC[numNPCs].Active = true;   NPC[numNPCs].TimeLeft = 1000; ....<\/code><\/pre>\n<p>  <\/p>\n<p>\u0412\u0438\u0434\u0438\u043c\u043e, \u0432 \u0445\u043e\u0434\u0435 \u0440\u0435\u0444\u0430\u043a\u0442\u043e\u0440\u0438\u043d\u0433\u0430 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f <em>tempPlayer<\/em> \u0441\u0442\u0430\u043b\u0430 \u0432\u0441\u0435\u0433\u0434\u0430 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043d\u0443\u043b\u0451\u043c. \u041c\u043e\u0436\u043d\u043e \u0443\u043c\u0435\u043d\u044c\u0448\u0438\u0442\u044c \u0432\u043b\u043e\u0436\u0435\u043d\u043d\u043e\u0441\u0442\u044c \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0439, \u0443\u0431\u0440\u0430\u0432 \u043b\u0438\u0448\u043d\u0435\u0435 \u0443\u0441\u043b\u043e\u0432\u0438\u0435.<\/p>\n<p>  <\/p>\n<p><strong>\u0424\u0440\u0430\u0433\u043c\u0435\u043d\u0442 N10<\/strong><\/p>\n<p>  <\/p>\n<p>\u0410 \u0437\u0434\u0435\u0441\u044c \u043b\u0438\u0448\u043d\u044f\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043d\u0430 \u0442\u043e, \u0447\u0442\u043e \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f \u043d\u0435 \u0440\u0430\u0432\u0435\u043d 0:<\/p>\n<p>  <\/p>\n<p><a href=\"https:\/\/pvs-studio.com\/ru\/w\/v562\/\">V562<\/a> It&#8217;s odd to compare a bool type value with a value of 0. thextech editor.cpp 102<\/p>\n<p>  <\/p>\n<pre><code class=\"cpp\">if(!MagicHand) {   if((getKeyState(vbKeyPageUp) == KEY_PRESSED) != 0)  \/\/ &lt;=   {     if(ScrollRelease == true) ....<\/code><\/pre>\n<p>  <\/p>\n<p>\u041c\u043e\u0436\u043d\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043f\u0440\u043e\u0441\u0442\u043e:<\/p>\n<p>  <\/p>\n<pre><code class=\"cpp\">if(getKeyState(vbKeyPageUp) == KEY_PRESSED)<\/code><\/pre>\n<p>  <\/p>\n<p>\u0415\u0449\u0451 \u0442\u0430\u043a\u0438\u0435 \u0436\u0435 \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043d\u0438\u044f:<\/p>\n<p>  <\/p>\n<ul>\n<li>V562 It&#8217;s odd to compare a bool type value with a value of 0. thextech editor.cpp 115<\/li>\n<li>V562 It&#8217;s odd to compare a bool type value with a value of 0. thextech editor.cpp 170<\/li>\n<\/ul>\n<p>  <\/p>\n<p><strong>\u0424\u0440\u0430\u0433\u043c\u0435\u043d\u0442 N11<\/strong><\/p>\n<p>  <\/p>\n<p>\u0412 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u043c\u043e\u0436\u0435\u0442 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u044c\u0441\u044f \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u043e\u0448\u0438\u0431\u043a\u0430. \u0412 \u0443\u0441\u043b\u043e\u0432\u0438\u0438 \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442\u0441\u044f \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0432 \u043c\u0430\u0441\u0441\u0438\u0432\u0435 \u043f\u043e \u0438\u043d\u0434\u0435\u043a\u0441\u0443 <em>whatPlayer<\/em> \u0438 \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442\u0441\u044f \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 <em>whatPlayer<\/em>:<\/p>\n<p>  <\/p>\n<p><a href=\"https:\/\/pvs-studio.com\/ru\/w\/v781\/\">V781<\/a> The value of the &#8216;whatPlayer&#8217; index is checked after it was used. Perhaps there is a mistake in program logic. thextech blocks.cpp 159<\/p>\n<p>  <\/p>\n<pre><code class=\"cpp\">if(b.ShakeY != 0 || b.ShakeY2 != 0 || b.ShakeY3 != 0) {   if(  b.RapidHit > 0     &amp;&amp; Player[whatPlayer].Character == 4 &amp;&amp; whatPlayer > 0) \/\/ &lt;=   {     b.RapidHit = (iRand() % 3) + 1;   }   return; }<\/code><\/pre>\n<p>  <\/p>\n<p>\u042d\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0438\u0432\u0435\u0441\u0442\u0438 \u043a \u043d\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u043e\u043c\u0443 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u044e.<\/p>\n<p>  <\/p>\n<p><strong>\u0424\u0440\u0430\u0433\u043c\u0435\u043d\u0442 N12<\/strong><\/p>\n<p>  <\/p>\n<p>\u041d\u0435\u043c\u043d\u043e\u0433\u043e \u0441\u0442\u0440\u0430\u043d\u043d\u044b\u0439 \u043a\u043e\u0434, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043f\u043e\u0441\u043b\u0435 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u0441\u0442\u0430\u043b\u043e \u043f\u0440\u0438\u0441\u0432\u0430\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u0435\u0451 \u0436\u0435 \u0442\u0435\u043a\u0443\u0449\u0435\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435:<\/p>\n<p>  <\/p>\n<p><a href=\"https:\/\/pvs-studio.com\/ru\/w\/v570\/\">V570<\/a> The &#8216;NPC[A].Location.X&#8217; variable is assigned to itself. thextech npc_hit.cpp 1995<\/p>\n<p>  <\/p>\n<pre><code class=\"cpp\">else {   NPC[A].Location.Y = NPC[A].Location.Y + NPC[A].Location.Height;   NPC[A].Location.X = NPC[A].Location.X; \/\/ - (32 - .Location.Width) \/ 2   .... }<\/code><\/pre>\n<p>  <\/p>\n<p>\u0412 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0435 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u043e\u0442 \u0442\u0430\u043a\u0438\u0445 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0439 \u043d\u0435 \u0441\u0442\u0440\u0430\u0434\u0430\u0435\u0442. \u041d\u043e \u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0439 \u043a\u043e\u0434 \u043c\u043e\u0436\u0435\u0442 \u0441\u0432\u0438\u0434\u0435\u0442\u0435\u043b\u044c\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u043e \u043f\u043e\u044f\u0432\u043b\u0435\u043d\u0438\u0438 \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u043e\u0448\u0438\u0431\u043e\u043a, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0435\u0441\u043b\u0438 \u043f\u043e\u0441\u043b\u0435 \u043e\u0442\u043b\u0430\u0434\u043a\u0438 \u0437\u0430\u0431\u044b\u043b\u0438 \u0432\u0435\u0440\u043d\u0443\u0442\u044c \u0437\u0430\u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442 \u043d\u0430 \u043c\u0435\u0441\u0442\u043e.<\/p>\n<p>  <\/p>\n<p>\u0415\u0449\u0451 \u043f\u0440\u0438\u043c\u0435\u0440\u044b \u043b\u0438\u0448\u043d\u0435\u0433\u043e \u043f\u0440\u0438\u0441\u0432\u0430\u0438\u0432\u0430\u043d\u0438\u044f:<\/p>\n<p>  <\/p>\n<ul>\n<li>V570 The &#8216;Player[A].MountOffsetY&#8217; variable is assigned to itself. thextech player.cpp 1861<\/li>\n<li>V570 The &#8216;tempLocation.X&#8217; variable is assigned to itself. thextech npc_update.cpp 4177<\/li>\n<li>V570 The &#8216;tempLocation.Width&#8217; variable is assigned to itself. thextech npc_update.cpp 4178<\/li>\n<\/ul>\n<p>  <\/p>\n<h3 id=\"prochie-oshibki\">\u041f\u0440\u043e\u0447\u0438\u0435 \u043e\u0448\u0438\u0431\u043a\u0438<\/h3>\n<p>  <\/p>\n<p><strong>\u0424\u0440\u0430\u0433\u043c\u0435\u043d\u0442 N13<\/strong><\/p>\n<p>  <\/p>\n<p>\u0421\u0442\u0440\u0430\u043d\u043d\u044b\u0439 \u0446\u0438\u043a\u043b \u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u044b\u0442\u0430\u0435\u0442\u0441\u044f \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0442\u044c JPEG \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435:<\/p>\n<p>  <\/p>\n<p><a href=\"https:\/\/pvs-studio.com\/ru\/w\/v654\/\">V654<\/a> The condition &#8216;chunk_size > 0&#8217; of loop is always true. thextech image_size.cpp 211<\/p>\n<p>  <\/p>\n<pre><code class=\"cpp\">static bool tryJPEG(SDL_RWops* file, uint32_t *w, uint32_t *h) {   ....   size_t chunk_size = 0;   ....   do   {     SDL_memset(raw, 0, JPEG_BUFFER_SIZE);     pos = SDL_RWtell(file);     chunk_size = SDL_RWread(file, raw, 1, JPEG_BUFFER_SIZE);     if(chunk_size == 0)       break;      head = findJpegHead(raw, JPEG_BUFFER_SIZE);     if(head)     {       if(head + 20 >= raw + JPEG_BUFFER_SIZE)       {         SDL_RWseek(file, -20, RW_SEEK_CUR);         continue; \/* re-scan this place *\/       }        if(SDL_memcmp(head, \"\\xFF\\xE1\", 2) == 0) \/* EXIF, skip it!*\/       {         const Sint64 curPos = pos + (head - raw);         Sint64 toSkip = BE16(head, 2); \/\/-V629         SDL_RWseek(file, curPos + toSkip + 2, RW_SEEK_SET);         continue;       }        *h = BE16(head, 5);       *w = BE16(head, 7);       return true;     }   } while(chunk_size > 0);               \/\/ &lt;=    return false; }<\/code><\/pre>\n<p>  <\/p>\n<p>\u041f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f <em>chunk_size<\/em> \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0432 \u0441\u0430\u043c\u043e\u043c \u043d\u0430\u0447\u0430\u043b\u0435 \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u0438 \u0446\u0438\u043a\u043b\u0430 \u0438, \u0435\u0441\u043b\u0438 \u043e\u043d\u0430 \u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0440\u0430\u0432\u043d\u043e\u0439 0, \u0446\u0438\u043a\u043b \u0437\u0430\u0432\u0435\u0440\u0448\u0430\u0435\u0442\u0441\u044f. \u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u043e\u043d\u0430 \u0434\u043e\u0439\u0434\u0451\u0442 \u0434\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0443\u0441\u043b\u043e\u0432\u0438\u044f \u0432\u044b\u0445\u043e\u0434\u0430 \u0438\u0437 \u0446\u0438\u043a\u043b\u0430, \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u0431\u043e\u043b\u044c\u0448\u0435 \u043d\u0443\u043b\u044f. \u0417\u0434\u0435\u0441\u044c \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0431\u0435\u0441\u043a\u043e\u043d\u0435\u0447\u043d\u044b\u0439 \u0446\u0438\u043a\u043b <em>&#8216;while (true)<\/em>&#8216;.<\/p>\n<p>  <\/p>\n<p><strong>\u0424\u0440\u0430\u0433\u043c\u0435\u043d\u0442 N14<\/strong><\/p>\n<p>  <\/p>\n<p>\u0412 \u044d\u0442\u043e\u043c \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 \u043f\u043e\u0431\u0438\u0442\u043e\u0432\u043e\u0433\u043e <em>\u0418\u041b\u0418<\/em> \u0432\u043c\u0435\u0441\u0442\u043e \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u043c\u0435\u0436\u0434\u0443 \u0432\u044b\u0437\u043e\u0432\u0430\u043c\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0439, \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u044e\u0449\u0438\u0445 <em>bool<\/em>. \u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u0432\u0441\u0435\u0433\u0434\u0430 \u0431\u0443\u0434\u0443\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u044b \u043e\u0431\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u0447\u0442\u043e \u043c\u0435\u043d\u0435\u0435 \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e:<\/p>\n<p>  <\/p>\n<p><a href=\"https:\/\/pvs-studio.com\/ru\/w\/v792\/\">V792<\/a> The &#8216;vScreenCollision&#8217; function located to the right of the operator &#8216;|&#8217; will be called regardless of the value of the left operand. Perhaps, it is better to use &#8216;||&#8217;. thextech gfx_update.cpp 1007<\/p>\n<p>  <\/p>\n<pre><code class=\"cpp\">bool vScreenCollision(int A, const Location_t &amp;Loc2) ....  \/\/ warp NPCs if(Player[A].HoldingNPC > 0 &amp;&amp; Player[A].Frame != 15) {   if((  vScreenCollision(Z, NPC[Player[A].HoldingNPC].Location)       | vScreenCollision(Z, newLoc(....))) != 0       \/\/ &lt;=     &amp;&amp; NPC[Player[A].HoldingNPC].Hidden == false)   { ....<\/code><\/pre>\n<p>  <\/p>\n<p>\u0422\u0430\u043a\u0430\u044f \u0436\u0435 \u043e\u0448\u0438\u0431\u043a\u0430 \u0432\u0441\u0442\u0440\u0435\u0447\u0430\u0435\u0442\u0441\u044f \u0435\u0449\u0451 \u0432 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u043c\u0435\u0441\u0442\u0430\u0445:<\/p>\n<p>  <\/p>\n<ul>\n<li>V792 The &#8216;vScreenCollision&#8217; function located to the right of the operator &#8216;|&#8217; will be called regardless of the value of the left operand. Perhaps, it is better to use &#8216;||&#8217;. thextech gfx_update.cpp 1253<\/li>\n<li>V792 The &#8216;vScreenCollision&#8217; function located to the right of the operator &#8216;|&#8217; will be called regardless of the value of the left operand. Perhaps, it is better to use &#8216;||&#8217;. thextech gfx_update.cpp 1351<\/li>\n<li>V792 The &#8216;vScreenCollision&#8217; function located to the right of the operator &#8216;|&#8217; will be called regardless of the value of the left operand. Perhaps, it is better to use &#8216;||&#8217;. thextech gfx_update.cpp 1405<\/li>\n<li>V792 The &#8216;CheckCollision&#8217; function located to the right of the operator &#8216;|&#8217; will be called regardless of the value of the left operand. Perhaps, it is better to use &#8216;||&#8217;. thextech player.cpp 4172<\/li>\n<\/ul>\n<p>  <\/p>\n<p><strong>\u0424\u0440\u0430\u0433\u043c\u0435\u043d\u0442 N15<\/strong><\/p>\n<p>  <\/p>\n<p>\u0412 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0437\u0430\u0447\u0435\u043c-\u0442\u043e \u043b\u0438\u0448\u043d\u0438\u0439 \u0440\u0430\u0437 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u0438\u0440\u0443\u044e\u0442 \u0441\u0442\u0440\u043e\u043a\u0443, \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u044f \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0432\u044b\u0437\u043e\u0432\u0430 \u043c\u0435\u0442\u043e\u0434\u0430 <em>c_str()<\/em> \u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u044e, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u0441\u0441\u044b\u043b\u043a\u0443 \u043d\u0430 <em>std::string<\/em>. \u0422\u0430\u043a\u043e\u0439 \u043a\u043e\u0434 \u043c\u0435\u043d\u0435\u0435 \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u0435\u043d, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043f\u0440\u0438 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0438 \u0438\u0437 <em>std::string<\/em> \u0432 <em>char*<\/em> \u0442\u0435\u0440\u044f\u0435\u0442\u0441\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043e \u0442\u0435\u043a\u0443\u0449\u0435\u0439 \u0434\u043b\u0438\u043d\u0435 \u0441\u0442\u0440\u043e\u043a\u0438. \u0418 \u043f\u0440\u0438 \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438 \u043d\u043e\u0432\u043e\u0433\u043e <em>std::string<\/em> \u0434\u043b\u0438\u043d\u0443 \u043f\u0440\u0438\u0434\u0451\u0442\u0441\u044f \u043f\u0435\u0440\u0435\u0441\u0447\u0438\u0442\u0430\u0442\u044c \u043b\u0438\u043d\u0435\u0439\u043d\u044b\u043c \u043f\u043e\u0438\u0441\u043a\u043e\u043c \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043d\u0443\u043b\u044f. \u041f\u0440\u0438\u0447\u0451\u043c \u044d\u0442\u043e\u0442 \u043c\u043e\u043c\u0435\u043d\u0442 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u043e\u043c \u043d\u0435 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u0443\u0435\u0442\u0441\u044f (\u043f\u0440\u043e\u0432\u0435\u0440\u0435\u043d\u043e \u0447\u0435\u0440\u0435\u0437 <a href=\"https:\/\/godbolt.org\/z\/E9Mq6197d\">Clang<\/a> \u0441 -O3 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044f\u043c\u0438).<\/p>\n<p>  <\/p>\n<p><a href=\"https:\/\/pvs-studio.com\/ru\/w\/v811\/\">V811<\/a> Decreased performance. Excessive type casting: string -> char * -> string. Consider inspecting first argument of the function open_file. thextech graphics_funcs.cpp 63<\/p>\n<p>  <\/p>\n<pre><code class=\"cpp\">bool FileMapper::open_file(const std::string&amp; path) {   return d->openFile(path); }  FIBITMAP *GraphicsHelps::loadImage(std::string file, bool convertTo32bit) { ....   if(!fileMap.open_file(file.c_str())) \/\/ &lt;=         return nullptr; .... }<\/code><\/pre>\n<p>  <\/p>\n<p><strong>\u0424\u0440\u0430\u0433\u043c\u0435\u043d\u0442 N16<\/strong><\/p>\n<p>  <\/p>\n<p>\u0412 \u044d\u0442\u043e\u043c \u0446\u0438\u043a\u043b\u0435 \u043c\u043d\u043e\u0433\u043e\u043a\u0440\u0430\u0442\u043d\u043e \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0440\u0430\u0441\u0447\u0451\u0442 \u0434\u043b\u0438\u043d\u044b \u043e\u0434\u043d\u0438\u0445 \u0438 \u0442\u0435\u0445 \u0436\u0435 \u0441\u0442\u0440\u043e\u043a. \u0421\u0442\u043e\u0438\u0442 \u043e\u0431\u044a\u044f\u0432\u0438\u0442\u044c \u0438\u0445 \u043a\u0430\u043a \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u044b \u0442\u0438\u043f\u0430 <em>std::string<\/em> \u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043c\u0435\u0442\u043e\u0434\u043e\u043c <em>size()<\/em>:<\/p>\n<p>  <\/p>\n<p><a href=\"https:\/\/pvs-studio.com\/ru\/w\/v814\/\">V814<\/a> Decreased performance. The &#8216;strlen&#8217; function was called multiple times inside the body of a loop. thextech menu_main.cpp 1027<\/p>\n<p>  <\/p>\n<pre><code class=\"cpp\">#define For(A, From, To) for(int A = From; A &lt;= To; ++A)  if(MenuMouseMove) {   For(A, 0, optionsMenuLength)   {     if(MenuMouseY >= 350 + A * 30 &amp;&amp; MenuMouseY &lt;= 366 + A * 30)     {       if(A == 0)         menuLen = 18 * std::strlen(\"player 1 controls\") - 4; \/\/ &lt;=       else if(A == 1)         menuLen = 18 * std::strlen(\"player 2 controls\") - 4; \/\/ &lt;= ....<\/code><\/pre>\n<p>  <\/p>\n<p>\u0418 \u0442\u0430\u043a\u043e\u0439 \u043f\u0430\u0442\u0442\u0435\u0440\u043d \u0432\u0441\u0442\u0440\u0435\u0447\u0430\u0435\u0442\u0441\u044f \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0447\u0430\u0441\u0442\u043e:<\/p>\n<p>  <\/p>\n<ul>\n<li>V814 Decreased performance. The &#8216;strlen&#8217; function was called multiple times inside the body of a loop. thextech menu_main.cpp 1029<\/li>\n<li>V814 Decreased performance. The &#8216;strlen&#8217; function was called multiple times inside the body of a loop. thextech menu_main.cpp 1034<\/li>\n<li>V814 Decreased performance. The &#8216;strlen&#8217; function was called multiple times inside the body of a loop. thextech menu_main.cpp 1036<\/li>\n<li>V814 Decreased performance. The &#8216;strlen&#8217; function was called multiple times inside the body of a loop. thextech menu_main.cpp 1040<\/li>\n<li>V814 Decreased performance. The &#8216;strlen&#8217; function was called multiple times inside the body of a loop. thextech menu_main.cpp 1131<\/li>\n<li>V814 Decreased performance. The &#8216;strlen&#8217; function was called multiple times inside the body of a loop. thextech menu_main.cpp 1174<\/li>\n<li>V814 Decreased performance. The &#8216;strlen&#8217; function was called multiple times inside the body of a loop. thextech menu_main.cpp 1200<\/li>\n<li>V814 Decreased performance. The &#8216;strlen&#8217; function was called multiple times inside the body of a loop. thextech menu_main.cpp 1204<\/li>\n<\/ul>\n<p>  <\/p>\n<h2 id=\"zaklyuchenie\">\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h2>\n<p>  <\/p>\n<p>\u0415\u0441\u043b\u0438 \u0432\u0435\u0440\u0438\u0442\u044c <a href=\"https:\/\/ru.wikipedia.org\/wiki\/Super_Mario_Bros._X\">\u0412\u0438\u043a\u0438\u043f\u0435\u0434\u0438\u0438<\/a>, \u043f\u0435\u0440\u0432\u044b\u0439 \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u044b\u0439 \u0440\u0435\u043b\u0438\u0437 TheXTech \u0431\u044b\u043b \u0432\u044b\u043f\u0443\u0449\u0435\u043d \u0432\u0441\u0435\u0433\u043e \u0447\u0435\u0440\u0435\u0437 \u043c\u0435\u0441\u044f\u0446 \u043f\u043e\u0441\u043b\u0435 \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u0438 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u044b\u0445 \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u043e\u0432 SMBX. \u042d\u0442\u043e, \u043d\u0430 \u043c\u043e\u0439 \u0432\u0437\u0433\u043b\u044f\u0434, \u043e\u0447\u0435\u043d\u044c \u043a\u0440\u0443\u0442\u043e \u0434\u043b\u044f \u043f\u043e\u043b\u043d\u043e\u0446\u0435\u043d\u043d\u043e\u0433\u043e \u043a\u0440\u043e\u0441\u0441\u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0435\u043d\u043d\u043e\u0433\u043e \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0430 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u043d\u0430 \u0434\u0440\u0443\u0433\u043e\u0439 \u044f\u0437\u044b\u043a \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f (\u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u043d\u0430 C++).<\/p>\n<p>  <\/p>\n<p>\u0412 \u0441\u043b\u0443\u0447\u0430\u0435 \u0435\u0441\u043b\u0438 \u043f\u043b\u0430\u043d\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u043a\u0430\u043f\u0438\u0442\u0430\u043b\u044c\u043d\u0430\u044f \u043f\u0435\u0440\u0435\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u043a\u043e\u0434\u0430, \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u0441\u0442\u043e\u0438\u0442 \u043d\u0430\u0447\u0430\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c PVS-Studio, \u0432\u0435\u0434\u044c \u043c\u044b \u0434\u0430\u0451\u043c <a href=\"https:\/\/pvs-studio.com\/ru\/open-source-license\/\">\u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u0443\u044e<\/a> \u043b\u0438\u0446\u0435\u043d\u0437\u0438\u044e \u0434\u043b\u044f open-source \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432.<\/p>\n<p>  <\/p>\n<p>\u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0431\u043e\u043d\u0443\u0441\u0430 \u2013 \u0432\u0438\u0434\u0435\u043e \u0441 \u043d\u0430\u0448\u0435\u0433\u043e YouTube \u043a\u0430\u043d\u0430\u043b\u0430 \u043d\u0430 \u0442\u0435\u043c\u0430\u0442\u0438\u043a\u0443 \u041c\u0430\u0440\u0438\u043e:<\/p>\n<p>  <\/p>\n<div class=\"oembed\">\n<div class=\"tm-iframe_temp\" data-src=\"https:\/\/embedd.srv.habr.com\/iframe\/619b71926ea11f3bbbaf204c\" data-style=\"\" id=\"619b71926ea11f3bbbaf204c\" width=\"\"><\/div>\n<\/div>\n<p>  <\/p>\n<p>\u0415\u0441\u043b\u0438 \u0445\u043e\u0442\u0438\u0442\u0435 \u043f\u043e\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435\u0439 \u0441 \u0430\u043d\u0433\u043b\u043e\u044f\u0437\u044b\u0447\u043d\u043e\u0439 \u0430\u0443\u0434\u0438\u0442\u043e\u0440\u0438\u0435\u0439, \u0442\u043e \u043f\u0440\u043e\u0448\u0443 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u0441\u044b\u043b\u043a\u0443 \u043d\u0430 \u043f\u0435\u0440\u0435\u0432\u043e\u0434: Alexey Govorov. <a href=\"https:\/\/habr.com\/en\/company\/pvs-studio\/blog\/590657\/\">Thanks, Mario, but the code needs fixing \u2014 checking TheXTech<\/a>.<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/590659\/\"> https:\/\/habr.com\/ru\/articles\/590659\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-1\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u0417\u0434\u043e\u0440\u043e\u0432\u043e, \u043a\u043e\u0433\u0434\u0430 \u044d\u043d\u0442\u0443\u0437\u0438\u0430\u0441\u0442\u0430\u043c-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430\u043c \u0443\u0434\u0430\u0451\u0442\u0441\u044f \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0449\u0438\u0439 \u043a\u043b\u043e\u043d \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u043e\u0439 \u0438\u0433\u0440\u044b. \u0415\u0449\u0451 \u043b\u0443\u0447\u0448\u0435, \u043a\u043e\u0433\u0434\u0430 \u043d\u0430\u0445\u043e\u0434\u044f\u0442\u0441\u044f \u043b\u044e\u0434\u0438, \u0433\u043e\u0442\u043e\u0432\u044b\u0435 \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u0442\u044c \u0440\u0430\u0437\u0432\u0438\u0442\u0438\u0435 \u0442\u0430\u043a\u0438\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432! \u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e PVS-Studio \u043c\u044b \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u043c TheXTech \u2013 \u043e\u0442\u043a\u0440\u044b\u0442\u0443\u044e \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u0438\u0433\u0440\u044b \u043f\u043e \u0432\u0441\u0435\u043b\u0435\u043d\u043d\u043e\u0439 Super Mario.<\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/post_images\/aed\/64f\/bd0\/aed64fbd090d7b6ccda41548ad61ec87.png\" alt=\"0889_TheXTech_ru\/image1.png\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/aed\/64f\/bd0\/aed64fbd090d7b6ccda41548ad61ec87.png\"\/><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-415277","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/415277","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=415277"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/415277\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=415277"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=415277"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=415277"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}