mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-22 18:02:05 +00:00
Fix another Valgrind warning during SMUSH playing.
svn-id: r5317
This commit is contained in:
parent
8318cff4ab
commit
cd25bd5623
@ -663,9 +663,10 @@ static StringResource * getStrings(const char * file, const char * directory, bo
|
||||
return getStrings(file, directory, false);
|
||||
}
|
||||
char * old = filebuffer;
|
||||
filebuffer = new char[length - ETRS_HEADER_LENGTH];
|
||||
filebuffer = new char[length - ETRS_HEADER_LENGTH + 1];
|
||||
for(int32 i = ETRS_HEADER_LENGTH; i < length; i++)
|
||||
filebuffer[i - ETRS_HEADER_LENGTH] = old[i] ^ 0xCC;
|
||||
filebuffer[length - ETRS_HEADER_LENGTH] = '\0';
|
||||
delete []old;
|
||||
length -= ETRS_HEADER_LENGTH;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user