eyalroz / printf

Tiny, fast(ish), self-contained, fully loaded printf, sprinf etc. implementation; particularly useful in embedded systems.
MIT License
419 stars 52 forks source link

Invalid truncation of getopt() result from int to char #181

Closed eyalroz closed 3 months ago

eyalroz commented 3 months ago

Our autotest executable (not part of the library - just testing code) uses the getopt() function.

Adam Bosely said:

getopt returns an int and truncating it to a char causes issues on my system https://man7.org/linux/man-pages/man3/getopt.3.html

and suggested a fix with PR #177 .