From 892edb7d5b182d0e4d61796c14d12e771d2c9987 Mon Sep 17 00:00:00 2001 From: Andrey Date: Mon, 25 Apr 2022 23:42:46 +0300 Subject: [PATCH] linux PIString fix --- libs/main/core/pistring.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libs/main/core/pistring.cpp b/libs/main/core/pistring.cpp index 1626cf60..2e1e0c02 100644 --- a/libs/main/core/pistring.cpp +++ b/libs/main/core/pistring.cpp @@ -234,12 +234,13 @@ void PIString::appendFromChars(const char * c, int s, const char * codepage) { mbstate_t state; memset(&state, 0, sizeof(state)); const char ** pc; + const char * cc_; if (s > 0) { char c_ [s+1]; memcpy(c_, c, s); c_[s] = '\0'; - const char * cc_ = &c_[0]; - pc = &cc; + cc_ = &c_[0]; + pc = &cc_; } else { pc = &c; }