Skip to content
Snippets Groups Projects
Commit 0be75c13 authored by Disruption's avatar Disruption
Browse files

Added 'this' reference to num_instructions field so it's properly updated,as...

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
parent 6448c2f3
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment