diff options
author | Eugene Sandulenko | 2010-10-15 08:57:18 +0000 |
---|---|---|
committer | Eugene Sandulenko | 2010-10-15 08:57:18 +0000 |
commit | b0923dfd763efc88bf9ecc6870cbe4b97605ab13 (patch) | |
tree | 0eacc6bc672c5c0c76da3c99e84db9e19ccd9ef1 /engines | |
parent | 168670acb2924b64df59452a34c15888c62b4a4f (diff) | |
download | scummvm-rg350-b0923dfd763efc88bf9ecc6870cbe4b97605ab13.tar.gz scummvm-rg350-b0923dfd763efc88bf9ecc6870cbe4b97605ab13.tar.bz2 scummvm-rg350-b0923dfd763efc88bf9ecc6870cbe4b97605ab13.zip |
CRUISE: Fix some code analysis warnings (bug #3087829)
svn-id: r53472
Diffstat (limited to 'engines')
-rw-r--r-- | engines/cruise/function.cpp | 4 | ||||
-rw-r--r-- | engines/cruise/script.cpp | 3 | ||||
-rw-r--r-- | engines/cruise/vars.cpp | 4 | ||||
-rw-r--r-- | engines/cruise/vars.h | 4 |
4 files changed, 8 insertions, 7 deletions
diff --git a/engines/cruise/function.cpp b/engines/cruise/function.cpp index 3d07abf441..7c8f8af942 100644 --- a/engines/cruise/function.cpp +++ b/engines/cruise/function.cpp @@ -58,9 +58,9 @@ int16 Op_LoadOverlay() { updateAllScriptsImports(); - strcpy(nextOverlay, overlayName); + strncpy(nextOverlay, overlayName, 38); - return(overlayLoadResult); + return overlayLoadResult; } int16 Op_Strcpy() { diff --git a/engines/cruise/script.cpp b/engines/cruise/script.cpp index d6c1aa47f3..3d07575c16 100644 --- a/engines/cruise/script.cpp +++ b/engines/cruise/script.cpp @@ -185,8 +185,9 @@ int32 opcodeType1() { return 0; } case 2: { + assert (ptr); *(ptr + var_A + offset) = var; - return (0); + return 0; } default: error("Unsupported code in opcodeType1 case 1"); diff --git a/engines/cruise/vars.cpp b/engines/cruise/vars.cpp index c61cedc503..07bd646cae 100644 --- a/engines/cruise/vars.cpp +++ b/engines/cruise/vars.cpp @@ -51,8 +51,8 @@ int32 volumeDataLoaded = 0; int16 numOfDisks; -char lastOverlay[15]; -char nextOverlay[15]; +char lastOverlay[38]; +char nextOverlay[38]; int16 currentActiveMenu; int16 autoMsg; diff --git a/engines/cruise/vars.h b/engines/cruise/vars.h index af39993f2f..54920a1436 100644 --- a/engines/cruise/vars.h +++ b/engines/cruise/vars.h @@ -154,8 +154,8 @@ extern int32 volumeDataLoaded; extern int16 numOfDisks; -extern char lastOverlay[15]; -extern char nextOverlay[15]; +extern char lastOverlay[38]; +extern char nextOverlay[38]; extern int16 currentActiveMenu; extern int16 autoMsg; |