diff --git a/CMakeLists.txt b/CMakeLists.txt index 4fb32476..e449e789 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_policy(SET CMP0017 NEW) # need include() with .cmake project(PIP) set(PIP_MAJOR 3) set(PIP_MINOR 19) -set(PIP_REVISION 0) +set(PIP_REVISION 1) set(PIP_SUFFIX ) set(PIP_COMPANY SHS) set(PIP_DOMAIN org.SHS) diff --git a/libs/main/text/pistring.cpp b/libs/main/text/pistring.cpp index af33c8b5..2baace77 100644 --- a/libs/main/text/pistring.cpp +++ b/libs/main/text/pistring.cpp @@ -300,6 +300,7 @@ void PIString::appendFromChars(const char * c, int s, const char * codepage) { if (s == 0) return; int old_sz = size_s(); if (s == -1) s = strlen(c); + if (s <= 0) return; #ifdef PIP_ICU UErrorCode e((UErrorCode)0); UConverter * cc = ucnv_open(codepage, &e);