Skip to content
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

Switch getopt from char to int #2

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

igor-hnizdo
Copy link

On some architectures, char is default as signed char, which causes infinite loop here.

I have changed char to int, which fixes this. Getopt should return int anyway.

https://stackoverflow.com/questions/17070958/c-why-does-getopt-return-255-on-linux

On some architectures, char is default as signed char, which causes infinite loop here.

I have changed char to int, which fixes this. Getopt should return int anyway.
@igor-hnizdo
Copy link
Author

It happened to me on arm64 fedora, but whatever

@igor-hnizdo
Copy link
Author

igor-hnizdo commented Sep 2, 2022

(I am making PR here as this is also the only fork that looks maintained :D the data stuff is fixed here at least)

@igor-hnizdo
Copy link
Author

Yep it's ARM thing.

@Cx01N Cx01N requested a review from vinnybod September 5, 2022 18:47
@igor-hnizdo
Copy link
Author

If someone else hits this issue before it's merged: just do CFLAGS="-fsigned-char" make

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