From ec74a4fd4a2a41cf00d0cd847b0e53b13ad2d28c Mon Sep 17 00:00:00 2001 From: xperia64 Date: Fri, 15 Mar 2019 23:19:24 +0000 Subject: [PATCH] Fix getopt on systems where char is unsigned by default --- src/yuzu_cmd/yuzu.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/yuzu_cmd/yuzu.cpp b/src/yuzu_cmd/yuzu.cpp index c6c66a7870..245f258470 100644 --- a/src/yuzu_cmd/yuzu.cpp +++ b/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(arg)) { case 'g': errno = 0; gdb_port = strtoul(optarg, &endarg, 0);