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:
parent
14eff87339
commit
674931a851
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user