mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-27 04:07:05 +00:00
Add missing safety checks.
svn-id: r17877
This commit is contained in:
parent
051977cd17
commit
2260447e8b
@ -2779,9 +2779,11 @@ void ScummEngine_v100he::decodeParseString(int m, int n) {
|
|||||||
_string[m].loadDefault();
|
_string[m].loadDefault();
|
||||||
if (n) {
|
if (n) {
|
||||||
_actorToPrintStrFor = pop();
|
_actorToPrintStrFor = pop();
|
||||||
|
if (_actorToPrintStrFor != 0xFF) {
|
||||||
a = derefActorSafe(_actorToPrintStrFor, "decodeParseString");
|
a = derefActorSafe(_actorToPrintStrFor, "decodeParseString");
|
||||||
_string[0].color = a->_talkColor;
|
_string[0].color = a->_talkColor;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case 92:
|
case 92:
|
||||||
_string[m].saveDefault();
|
_string[m].saveDefault();
|
||||||
|
@ -1570,10 +1570,12 @@ void ScummEngine_v72he::o72_talkActor() {
|
|||||||
Actor *a;
|
Actor *a;
|
||||||
|
|
||||||
_actorToPrintStrFor = pop();
|
_actorToPrintStrFor = pop();
|
||||||
a = derefActorSafe(_actorToPrintStrFor, "o72_talkActor");
|
|
||||||
|
|
||||||
_string[0].loadDefault();
|
_string[0].loadDefault();
|
||||||
|
if (_actorToPrintStrFor != 0xFF) {
|
||||||
|
a = derefActorSafe(_actorToPrintStrFor, "o72_talkActor");
|
||||||
_string[0].color = a->_talkColor;
|
_string[0].color = a->_talkColor;
|
||||||
|
}
|
||||||
actorTalk(_scriptPointer);
|
actorTalk(_scriptPointer);
|
||||||
|
|
||||||
_scriptPointer += resStrLen(_scriptPointer) + 1;
|
_scriptPointer += resStrLen(_scriptPointer) + 1;
|
||||||
@ -2258,9 +2260,11 @@ void ScummEngine_v72he::decodeParseString(int m, int n) {
|
|||||||
_string[m].loadDefault();
|
_string[m].loadDefault();
|
||||||
if (n) {
|
if (n) {
|
||||||
_actorToPrintStrFor = pop();
|
_actorToPrintStrFor = pop();
|
||||||
|
if (_actorToPrintStrFor != 0xFF) {
|
||||||
a = derefActorSafe(_actorToPrintStrFor, "decodeParseString");
|
a = derefActorSafe(_actorToPrintStrFor, "decodeParseString");
|
||||||
_string[0].color = a->_talkColor;
|
_string[0].color = a->_talkColor;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case 0xFF:
|
case 0xFF:
|
||||||
_string[m].saveDefault();
|
_string[m].saveDefault();
|
||||||
|
Loading…
Reference in New Issue
Block a user