LordHoto spotted the same kind of overlapping strcpy() call in one more place.

I didn't notice it because it never executed that part when I used Valgrind.

svn-id: r46945
This commit is contained in:
Torbjörn Andersson 2010-01-03 20:47:04 +00:00
parent f15db40927
commit c83058d30b

View File

@ -805,7 +805,12 @@ const ADGameDescription *TinselMetaEngine::fallbackDetect(const Common::FSList &
char tempFilename[50];
strcpy(tempFilename, fileDesc->fileName);
char *pOne = strchr(tempFilename, '1');
if (pOne) strcpy(pOne, pOne + 1);
if (pOne) {
do {
*pOne = *(pOne + 1);
pOne++;
} while (*pOne);
}
Common::String tstr(tempFilename);