From 19435819daab73bb3ba989b7bf95e726558acbfd Mon Sep 17 00:00:00 2001 From: "Joshua J. Cogliati" Date: Wed, 27 Dec 2023 10:02:20 -0700 Subject: [PATCH] Add conversion for string. --- wxMain.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wxMain.cpp b/wxMain.cpp index 61d3d8e..6f7e262 100644 --- a/wxMain.cpp +++ b/wxMain.cpp @@ -222,7 +222,7 @@ extern "C" int wxUnget_c(int c, FILE * f) { extern "C" void getExecutableDir(char * path, int maxlen) { wxString executable = wxStandardPaths::Get().GetExecutablePath(); wxString executable_dir = wxFileName(executable).GetPath(); - strncpy(path, executable_dir, maxlen); + strncpy(path, (const char*)executable_dir.mb_str(wxConvUTF8), maxlen); path[maxlen - 1] = '\0'; }