Explorar o código

Fix getopt on systems where char is unsigned by default

xperia64 %!s(int64=7) %!d(string=hai) anos
pai
achega
ec74a4fd4a
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  1. 2 2
      src/yuzu_cmd/yuzu.cpp

+ 2 - 2
src/yuzu_cmd/yuzu.cpp

@@ -114,9 +114,9 @@ int main(int argc, char** argv) {
     };
 
     while (optind < argc) {
-        char arg = getopt_long(argc, argv, "g:fhvp::", long_options, &option_index);
+        int arg = getopt_long(argc, argv, "g:fhvp::", long_options, &option_index);
         if (arg != -1) {
-            switch (arg) {
+            switch (static_cast<char>(arg)) {
             case 'g':
                 errno = 0;
                 gdb_port = strtoul(optarg, &endarg, 0);