mirror of
https://github.com/OpenMW/openmw.git
synced 2025-01-30 09:45:36 +00:00
Fix null character issue in ESMReader::getString
This commit is contained in:
parent
14aacf9a72
commit
fc663addfa
1 changed files with 1 additions and 2 deletions
|
@ -299,8 +299,7 @@ std::string ESMReader::getString(int size)
|
|||
char *ptr = &mBuffer[0];
|
||||
getExact(ptr, size);
|
||||
|
||||
if (size>0 && ptr[size-1]==0)
|
||||
--size;
|
||||
size = strnlen(ptr, size);
|
||||
|
||||
// Convert to UTF8 and return
|
||||
if (mEncoder)
|
||||
|
|
Loading…
Reference in a new issue