]> git.cworth.org Git - apitrace/blobdiff - cli/cli_dump.cpp
gui: Prevent assertion failure on debug builds.
[apitrace] / cli / cli_dump.cpp
index e30f6cc2b49574a00d58a111b38c82b59ca0982f..f37c027f211ebf4d03b8f21698fbe9a31233ff15 100644 (file)
@@ -148,7 +148,7 @@ command(int argc, char *argv[])
             }
             break;
         default:
-            std::cerr << "error: unexpected option `" << opt << "`\n";
+            std::cerr << "error: unexpected option `" << (char)opt << "`\n";
             usage();
             return 1;
         }
@@ -158,7 +158,7 @@ command(int argc, char *argv[])
 #ifdef _WIN32
         color = COLOR_OPTION_ALWAYS;
 #else
-        color = isatty(1) ? COLOR_OPTION_ALWAYS : COLOR_OPTION_NEVER;
+        color = isatty(STDOUT_FILENO) ? COLOR_OPTION_ALWAYS : COLOR_OPTION_NEVER;
         pipepager();
 #endif
     }