From a1cf492ff4f3cc396b8c03bbf1452a86cf896c69 Mon Sep 17 00:00:00 2001 From: Nathan Woods Date: Wed, 4 Jan 2017 18:59:06 -0500 Subject: [PATCH] Missed these, which needed wstring_from_utf8() --- src/tools/imgtool/main.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/tools/imgtool/main.cpp b/src/tools/imgtool/main.cpp index 35628b46778..28029fe0358 100644 --- a/src/tools/imgtool/main.cpp +++ b/src/tools/imgtool/main.cpp @@ -34,7 +34,7 @@ static void writeusage(std::wostream &output, bool write_word_usage, const struc util::stream_format(output, L"%s %s %s %s\n", (write_word_usage ? L"Usage:" : L" "), - cmdname, + wstring_from_utf8(cmdname), c->name, c->usage ? wstring_from_utf8(c->usage) : std::wstring()); } @@ -224,7 +224,7 @@ static int cmd_dir(const struct command *c, int argc, char *argv[]) info = image->info(); if (!info.empty()) - util::stream_format(std::wcout, L"%s\n", info); + util::stream_format(std::wcout, L"%s\n", wstring_from_utf8(info)); util::stream_format(std::wcout, L"%s\n", wstring_from_utf8(separator)); @@ -769,9 +769,9 @@ static void listoptions(const util::option_guide &opt_guide, const char *opt_spe } util::stream_format(std::wcout, L"%16s %-30s %s\n", - opt_name, - description_buffer.str(), - opt_desc); + wstring_from_utf8(opt_name), + wstring_from_utf8(description_buffer.str()), + wstring_from_utf8(opt_desc)); } }