Explorar o código

Added 'this' reference to num_instructions field so it's properly updated,as before the method was affecting the local method parameter rather than the class field

Disruption %!s(int64=12) %!d(string=hai) anos
pai
achega
0be75c13ee
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      src/core/arm/arm_interface.h

+ 1 - 1
src/core/arm/arm_interface.h

@@ -25,7 +25,7 @@ public:
      */
     void Run(int num_instructions) {
         ExecuteInstructions(num_instructions);
-        num_instructions += num_instructions;
+        this->num_instructions += num_instructions;
     }
 
     /// Step CPU by one instruction