Ensure any tail bytes in the strings data are zeroed.

This commit is contained in:
Bill Currie 2011-02-09 18:32:37 +09:00
parent 2d5d8eda5a
commit 244d969ae3

View file

@ -193,7 +193,8 @@ WriteData (int crc)
dd->type |= DEF_SAVEGLOBAL;
}
pr.strings->size = (pr.strings->size + 3) & ~3;
while (pr.strings->size & 3)
pr.strings->strings[pr.strings->size++] = 0;
if (options.verbosity >= 0) {
printf ("%6i strofs\n", pr.strings->size);