mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-13 21:31:53 +00:00
COMMON: Fix encoding conversion using iconv
It was not always setting to 0 all the newly allocated bytes, and if you were unlucky this could result in additional spurious characters at the end of the converted string.
This commit is contained in:
parent
f9b05f5e5a
commit
58203e09fd
@ -235,7 +235,7 @@ char *Encoding::convertIconv(const char *to, const char *from, const char *strin
|
||||
}
|
||||
dst = buffer + (dst - oldString);
|
||||
outSize = stringSize - (dst - buffer);
|
||||
memset(dst, 0, stringSize / 2);
|
||||
memset(dst, 0, outSize);
|
||||
} else {
|
||||
error = true;
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user