mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-14 13:50:13 +00:00
When source and destination are the same, there is no need to strcpy(). In fact
it may even be harmful when source and destination overlap. (This happens when loading savegames.) svn-id: r40508
This commit is contained in:
parent
536bdeacd4
commit
0cc6b88f58
@ -206,7 +206,8 @@ int loadBackground(const char *name, int idx) {
|
||||
}
|
||||
|
||||
|
||||
strcpy(backgroundTable[idx].name, name);
|
||||
if (name != backgroundTable[idx].name)
|
||||
strcpy(backgroundTable[idx].name, name);
|
||||
|
||||
return (0);
|
||||
}
|
||||
|
@ -325,7 +325,8 @@ int initCt(const char *ctpName) {
|
||||
}
|
||||
free(ptr);
|
||||
|
||||
strcpy(currentCtpName, ctpName);
|
||||
if (ctpName != currentCtpName)
|
||||
strcpy(currentCtpName, ctpName);
|
||||
|
||||
numberOfWalkboxes = segementSizeTable[6] / 2; // get the number of walkboxes
|
||||
|
||||
|
@ -499,7 +499,8 @@ int loadSetEntry(const char *name, uint8 *ptr, int currentEntryIdx, int currentD
|
||||
}
|
||||
}
|
||||
|
||||
strcpy(filesDatabase[fileIndex].subData.name, name);
|
||||
if (name != filesDatabase[fileIndex].subData.name)
|
||||
strcpy(filesDatabase[fileIndex].subData.name, name);
|
||||
|
||||
// create the mask
|
||||
switch (localBuffer.type) {
|
||||
|
Loading…
Reference in New Issue
Block a user