1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-02-19 18:39:55 +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);