Comparison always true. Fixed

This commit is contained in:
Jordi Santonja Blanes 2025-12-08 08:21:55 +01:00
parent 6e40b1eefb
commit c9c51bb6cc

View File

@ -125,7 +125,7 @@ int main(void)
if (IsMouseButtonPressed(MOUSE_BUTTON_LEFT) && (mouseInCell >= 0)) if (IsMouseButtonPressed(MOUSE_BUTTON_LEFT) && (mouseInCell >= 0))
{ {
// Rule changed both by selecting a preset or toggling a bit // Rule changed both by selecting a preset or toggling a bit
if ((mouseInCell >= 0) && (mouseInCell < 8)) if (mouseInCell < 8)
rule ^= (1 << mouseInCell); rule ^= (1 << mouseInCell);
else else
rule = presetValues[mouseInCell - 8]; rule = presetValues[mouseInCell - 8];