aboutsummaryrefslogtreecommitdiff
path: root/src/server/worldserver/CommandLine
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/worldserver/CommandLine')
-rw-r--r--src/server/worldserver/CommandLine/CliRunnable.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/server/worldserver/CommandLine/CliRunnable.cpp b/src/server/worldserver/CommandLine/CliRunnable.cpp
index c71213761f2..57ea5916553 100644
--- a/src/server/worldserver/CommandLine/CliRunnable.cpp
+++ b/src/server/worldserver/CommandLine/CliRunnable.cpp
@@ -92,18 +92,17 @@ int cli_hook_func()
#endif
-void utf8print(void* /*arg*/, char const* str)
+void utf8print(void* /*arg*/, std::string_view str)
{
#if TRINITY_PLATFORM == TRINITY_PLATFORM_WINDOWS
- wchar_t wtemp_buf[6000];
- size_t wtemp_len = 6000-1;
- if (!Utf8toWStr(str, strlen(str), wtemp_buf, wtemp_len))
+ std::wstring wbuf;
+ if (!Utf8toWStr(str, wbuf))
return;
- wprintf(L"%s", wtemp_buf);
+ wprintf(L"%s", wbuf.c_str());
#else
{
- printf("%s", str);
+ printf(STRING_VIEW_FMT, STRING_VIEW_FMT_ARG(str));
fflush(stdout);
}
#endif