Summary 0000456: rev1581 uses wrong way operator || in functions of imarket Description many functions use construction if (mode== enum_mode_value1 || enum_mode_value2 || enum_mode_value3) do_something while these modes are raw enum, not the bitfields so its results as if (mode==1) do_something so please somebody to fix Steps To Reproduce fails concept on any mode!=1 so produces runtime errors on any market mode diffrent from those equal 1 (those equal1 will be used more frequently so it could have time to observe) Additional Information its issue on coder side, which may be hard to understand for players and testers which aren't c++ programers (eg. aren't coders of this project)
Code is obviously wrong and will be fixed. Thanks for notice.
Not really, mode==val1 is evaluated first and than we take an alternative of comparison result and val2 and val3. Since val2 and val3 are non-zero, it results as
Actually there won’t be any errors. The if expression will be always true and for now it will be always true anyway, since any other modes are not supported. Well, that’s half-done trunk code, don’t expect too much