diff --git a/thirdparty/compoundfilereader/utf.h b/thirdparty/compoundfilereader/utf.h index 478bfd8285..dc92f1a693 100644 --- a/thirdparty/compoundfilereader/utf.h +++ b/thirdparty/compoundfilereader/utf.h @@ -113,6 +113,9 @@ std::wstring UTF16ToWstring(const T* u16, size_t len = 0) size_t pos = 0; while( GetNextCodePointFromUTF16( u16, len, &pos, &cp ) ) { + if( !cp ) + break; + ret += cp; } }