ref: 50f091ab7ced12e76f458a7a55e961839b5c1e80
parent: 7437f7eb85d39e6f00d89eb26ec44007166c7d34
author: ISSOtm <[email protected]>
date: Sat Jan 18 17:12:25 EST 2020
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
--- a/src/link/main.c
+++ b/src/link/main.c
@@ -109,7 +109,7 @@
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 */