1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-02-04 03:40:14 +00:00

remove terminating 0 from strings read from ESM records

This commit is contained in:
Marc Zinnschlag 2013-12-06 14:24:14 +01:00
parent 14eff87339
commit 674931a851

View File

@ -302,6 +302,9 @@ std::string ESMReader::getString(int size)
char *ptr = &mBuffer[0];
getExact(ptr, size);
if (size>0 && ptr[size-1]==0)
--size;
// Convert to UTF8 and return
if (mEncoder)
return mEncoder->getUtf8(ptr, size);