From 37356fed4489db09226f1cbf359d2ebe79dbcbd1 Mon Sep 17 00:00:00 2001 From: ridiculousfish Date: Sat, 8 May 2021 21:30:08 -0700 Subject: [PATCH] Use wide printing when outputting debug categories glibc doesn't like it when wide and narrow printing is mixed. This fixes a strange beeping when running with debug enabled on glibc. --- src/fish.cpp | 2 +- src/fish_indent.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/fish.cpp b/src/fish.cpp index b11503fb6..43621fca1 100644 --- a/src/fish.cpp +++ b/src/fish.cpp @@ -309,7 +309,7 @@ static int fish_parse_opt(int argc, char **argv, fish_cmd_opts_t *opts) { } for (auto cat : get_flog_categories()) { if (cat->enabled) { - printf("Debug enabled for category: %ls\n", cat->name); + std::fwprintf(stdout, L"Debug enabled for category: %ls\n", cat->name); } } break; diff --git a/src/fish_indent.cpp b/src/fish_indent.cpp index 30e3cbab6..ff2eef2d0 100644 --- a/src/fish_indent.cpp +++ b/src/fish_indent.cpp @@ -935,7 +935,7 @@ int main(int argc, char *argv[]) { } for (auto cat : get_flog_categories()) { if (cat->enabled) { - printf("Debug enabled for category: %ls\n", cat->name); + std::fwprintf(stdout, L"Debug enabled for category: %ls\n", cat->name); } } break;