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
}
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 undershoes/console
at line 402, which we think is a logic error. Specifically in the snippet below, we believe the second conditional expression should beattr == 49
instead ofattr = 49
.Can you please confirm our finding?