#34 Fix incorrect usage of ++ operator

open
nobody
None
5
2006-12-04
2006-12-04
Andrew Church
No

In several cases, src/arm-new.h uses the ++ operator on a variable (busPrefetchCount) in an expression which assigns a value to the same variable. I'm pretty sure this results in undefined behavior, and in any case it's unclear (why increment the variable when you're assigning it a new value anyway?). This patch corrects such cases to "+1" instead, which is presumably the intended meaning.

Discussion

  • Andrew Church
    Andrew Church
    2006-12-04

    Logged In: YES
    user_id=527960
    Originator: YES

    Found some cases in src/GBA.cpp as well, attaching an updated patch.

     
  • Andrew Church
    Andrew Church
    2006-12-04