Files
@ r26727:e2c8c42642ff
Branch filter:
Location: cpp/openttd-patchpack/source/.editorconfig
r26727:e2c8c42642ff
131 B
text/plain
Fix: bad oddness checks
Modulo on a signed number returns negative values for negative values, so
i % 2 == 1 will only return true for positive odd numbers, whereas i % 2 != 0
returns true for both positive and negative odd numbers.
Modulo on a signed number returns negative values for negative values, so
i % 2 == 1 will only return true for positive odd numbers, whereas i % 2 != 0
returns true for both positive and negative odd numbers.