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; }