aboutsummaryrefslogtreecommitdiff
path: root/scumm/script_v2.cpp
diff options
context:
space:
mode:
authorMax Horn2003-05-21 18:09:49 +0000
committerMax Horn2003-05-21 18:09:49 +0000
commit86d57f3c7af8fd0d4c6a4d1751ccdaac77c3b2e8 (patch)
treeaa7c2126baa9dd2ca7dd80910f5835b6aa861294 /scumm/script_v2.cpp
parent11d29b71ab4400e6e732ba7cd49a343150360eaf (diff)
downloadscummvm-rg350-86d57f3c7af8fd0d4c6a4d1751ccdaac77c3b2e8.tar.gz
scummvm-rg350-86d57f3c7af8fd0d4c6a4d1751ccdaac77c3b2e8.tar.bz2
scummvm-rg350-86d57f3c7af8fd0d4c6a4d1751ccdaac77c3b2e8.zip
many pedantic warning fixes (and some actual potential buglets fixed, too)
svn-id: r7795
Diffstat (limited to 'scumm/script_v2.cpp')
-rw-r--r--scumm/script_v2.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/scumm/script_v2.cpp b/scumm/script_v2.cpp
index 53c33af8d9..509775a9a9 100644
--- a/scumm/script_v2.cpp
+++ b/scumm/script_v2.cpp
@@ -882,7 +882,7 @@ void Scumm_v2::o2_doSentence() {
void Scumm_v2::o2_drawSentence() {
ScummVM::Rect sentenceline;
static char sentence[80];
- byte *temp;
+ const byte *temp;
int slot = getVerbSlot(VAR(VAR_SENTENCE_VERB),0);
if (!(_userState & 32))
@@ -893,7 +893,7 @@ void Scumm_v2::o2_drawSentence() {
temp = getObjOrActorName(VAR(VAR_SENTENCE_OBJECT1));
if (temp) {
strcat(sentence, " ");
- strcat(sentence, (char*)temp);
+ strcat(sentence, (const char*)temp);
}
}
@@ -901,7 +901,7 @@ void Scumm_v2::o2_drawSentence() {
temp = getObjOrActorName(VAR(VAR_SENTENCE_OBJECT2));
if (temp) {
strcat(sentence, " with ");
- strcat(sentence, (char*)temp);
+ strcat(sentence, (const char*)temp);
}
}
@@ -1263,6 +1263,8 @@ void Scumm_v2::o2_setObjectName() {
error("Can't set actor %d name with new-name-of", obj);
name = getObjOrActorName(obj);
+ if (name == NULL)
+ return; // Silently abort
byte *objptr;
byte offset = 0;