aboutsummaryrefslogtreecommitdiff
path: root/engines/cine/bg.cpp
diff options
context:
space:
mode:
authorTorbjörn Andersson2007-06-08 19:29:48 +0000
committerTorbjörn Andersson2007-06-08 19:29:48 +0000
commit059ba7326ca0d96203d7eefcffdd65daef655eec (patch)
treee9325c089b7de493194ed827529ec1ba20a7ced0 /engines/cine/bg.cpp
parenta3e8f765a6be500357b99d693b21266dbc428137 (diff)
downloadscummvm-rg350-059ba7326ca0d96203d7eefcffdd65daef655eec.tar.gz
scummvm-rg350-059ba7326ca0d96203d7eefcffdd65daef655eec.tar.bz2
scummvm-rg350-059ba7326ca0d96203d7eefcffdd65daef655eec.zip
Fixed some Valgrind warnings (overlapping source and destination in strcpy()).
svn-id: r27207
Diffstat (limited to 'engines/cine/bg.cpp')
-rw-r--r--engines/cine/bg.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/engines/cine/bg.cpp b/engines/cine/bg.cpp
index c368868113..32b59e0554 100644
--- a/engines/cine/bg.cpp
+++ b/engines/cine/bg.cpp
@@ -42,7 +42,8 @@ byte loadCt(const char *ctName) {
uint16 header[32];
byte *ptr, *dataPtr;
- strcpy(currentCtName, ctName);
+ if (currentCtName != ctName)
+ strcpy(currentCtName, ctName);
ptr = dataPtr = readBundleFile(findFileInBundle(ctName));
@@ -86,7 +87,8 @@ void loadBgHigh(const char *currentPtr) {
byte loadBg(const char *bgName) {
byte *ptr, *dataPtr;
- strcpy(currentBgName[0], bgName);
+ if (currentBgName[0] != bgName)
+ strcpy(currentBgName[0], bgName);
byte fileIdx = findFileInBundle(bgName);
ptr = dataPtr = readBundleFile(fileIdx);