From 0aaa5ba890d2eaa8cd3186d0bf02e28cd9cf4500 Mon Sep 17 00:00:00 2001 From: Andrey Date: Mon, 25 Apr 2022 23:58:38 +0300 Subject: [PATCH] linux PIString fix --- libs/main/core/pistring.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/main/core/pistring.cpp b/libs/main/core/pistring.cpp index 9522d6fb..9395c78d 100644 --- a/libs/main/core/pistring.cpp +++ b/libs/main/core/pistring.cpp @@ -246,7 +246,7 @@ void PIString::appendFromChars(const char * c, int s, const char * codepage) { size_t len = mbsrtowcs(NULL, pc, 0, &state); wchar_t wstr[len+1]; mbsrtowcs(&wstr[0], pc, len+1, &state); - if (s > 0) free(c_); + if (c_) free(c_); enlarge(len); for (size_t i=0; i