linux PIString fix

This commit is contained in:
2022-04-25 23:58:06 +03:00
parent a304997177
commit 0cf7fb9f25

View File

@@ -236,10 +236,10 @@ void PIString::appendFromChars(const char * c, int s, const char * codepage) {
const char ** pc; const char ** pc;
char * c_ = nullptr; char * c_ = nullptr;
if (s > 0) { if (s > 0) {
c_ = malloc(s+1); c_ = (char*)malloc(s+1);
memcpy(c_, c, s); memcpy(c_, c, s);
c_[s] = '\0'; c_[s] = '\0';
pc = &c_; pc = (const char **)&c_;
} else { } else {
pc = &c; pc = &c;
} }