Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Possible logic error in code #468

Open
nhasabni opened this issue May 17, 2022 · 2 comments
Open

Possible logic error in code #468

nhasabni opened this issue May 17, 2022 · 2 comments

Comments

@nhasabni
Copy link

nhasabni commented May 17, 2022

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
Copy link

ccoupe commented May 18, 2022

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

@nhasabni
Copy link
Author

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

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants