MitchellSternke / SuperMarioBros-C

An attempt to translate the original Super Mario Bros. for the NES to readable C/C++
625 stars 70 forks source link

Fix bug in MemoryAccess.cpp #27

Closed SergioMartin86 closed 4 months ago

SergioMartin86 commented 1 year ago

Detected a bug, where the reference is taken from the argument-by-value and not the persistent class member. The bug would manifest when compiling with -O3 (yet work correctly with -O0). I recommend this fix to prevent others from experimenting this problem.