shoes / shoes3

a tiny graphical app kit for ruby
http://walkabout.mvmanila.com
Other
181 stars 19 forks source link

Possible logic error in code #468

Open nhasabni opened 2 years ago

nhasabni commented 2 years ago

Hello,

We have developed a tool, named ControlFlag, that assist software developers in detecting coding anomalies in their programs. We found an anomaly described below, which we think can be corrected with a better rewrite.

Our tool recently found an abnormal expression in testi.c file under shoes/console at line 402, which we think is a logic error. Specifically in the snippet below, we believe the second conditional expression should be attr == 49 instead of attr = 49.

    } else if ((attr == 39) || (attr = 49)) {
        if (to->callback_setdefcolor)
            to->callback_setdefcolor(to, attr);
    } else {
        // ignored. This behaviour is needed for those 255 above
    }

Can you please confirm our finding?

ccoupe commented 2 years ago

Looks like an error to me. It's no longer maintained so the issue probably won't be closed. Thanks for reporting.

nhasabni commented 2 years ago

Thanks @ccoupe for the confirmation. Sure, I understand.