Skip to content

Fix some portability issues #5

New issue

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

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

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

marcin-serwin
Copy link

@marcin-serwin marcin-serwin commented Apr 27, 2025

I've run into some bugs while trying to run this game on aarch64-linux. Motivations for all changes are in commit descriptions.

`char`s are not necessarily signed and on some architectures that means
that `CHAR_MAX` is 255. This causes gcc to complain about array bound
mismatch because it's hardcoded as 127 in declaration.
`fgetc` returns `int` and `EOF` does not necessarily fit into `char`
which may cause infinite loops or premature finish of reading.
`vs_mainVisual` is initialized to -1 and `au_mainPlay` calls
`vs_mainStop` before `vs_mainPlay` causing out of bounds write.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant