mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 10:12:06 +00:00
Fix RGBLINK failing to read args on certain machines
`char` has implementation-defined signedness, and if it's chosen to be unsigned, then -1 gets converted to 255, which is then promoted back to `int` as... 255, always failing the loop condition in src/link/main.c:118 `int8_t` has the correct signedness, but considering `musl_getopt_long_only` returns `int`, better use that so as not to lose any bits
This commit is contained in:
@@ -109,7 +109,7 @@ static void cleanup(void)
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
char optionChar;
|
||||
int optionChar;
|
||||
char *endptr; /* For error checking with `strtol` */
|
||||
unsigned long value; /* For storing `strtoul`'s return value */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user