termux-packages/packages/rgbds/src-extern-getopt.c.patch

13 lines
460 B
Diff
Raw Normal View History

2020-04-14 22:07:52 +02:00
diff -uNr rgbds/src/extern/getopt.c rgbds.mod/src/extern/getopt.c
2021-05-05 17:04:19 +02:00
--- rgbds/src/extern/getopt.c 2021-03-20 00:41:50.000000000 +0000
+++ rgbds.mod/src/extern/getopt.c 2021-05-05 14:58:53.925498951 +0000
@@ -208,7 +208,7 @@
2020-04-14 22:07:52 +02:00
}
cnt++;
}
2021-05-05 17:04:19 +02:00
- if (cnt == 1 && longonly && arg - start == mblen(start, MB_LEN_MAX)) {
+ if (cnt == 1 && longonly && arg - start == mbtowc(0, start, MB_LEN_MAX)) {
int l = arg - start;
for (i = 0; optstring[i]; i++) {