forked from mirror/openmw-tes3mp
remove terminating 0 from strings read from ESM records
This commit is contained in:
parent
14eff87339
commit
674931a851
1 changed files with 3 additions and 0 deletions
|
@ -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…
Reference in a new issue