diff --git a/libs/main/core/pistring.cpp b/libs/main/core/pistring.cpp index a1147d71..541c0dcc 100644 --- a/libs/main/core/pistring.cpp +++ b/libs/main/core/pistring.cpp @@ -223,7 +223,7 @@ void PIString::appendFromChars(const char * c, int s, const char * codepage) { } #else # ifdef WINDOWS - if (s == -1) s = strlen(s); + if (s == -1) s = strlen(c); int sz = MultiByteToWideChar((uint)(uintptr_t)codepage, MB_ERR_INVALID_CHARS, c, s, 0, 0); if (sz <= 0) return; enlarge(sz);