Skip to content

Commit

Permalink
LILLIPUT: Fix some uninitialized variables reported by Valgrind (Than…
Browse files Browse the repository at this point in the history
…ks Hkz for reporting)
  • Loading branch information
Strangerke authored and sev- committed Mar 28, 2018
1 parent ca2534d commit 9fc6e8f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
2 changes: 2 additions & 0 deletions engines/lilliput/lilliput.cpp
Expand Up @@ -150,6 +150,7 @@ LilliputEngine::LilliputEngine(OSystem *syst, const LilliputGameDescription *gd)
_byte12FE4 = 0xFF;
_byte12FE3 = 0;
_byte16F08 = 0;
_byte16C9F = 0;

_currentScriptCharacter = 0;
_currentScriptCharacterPosition = 0;
Expand All @@ -165,6 +166,7 @@ LilliputEngine::LilliputEngine(OSystem *syst, const LilliputGameDescription *gd)
_word15AC2 = 0;
_displayStringIndex = 0;
_word1289D = 0;
_numCharacters = 0;

_saveFlag = false;
_byte16F07_menuId = 0;
Expand Down
5 changes: 5 additions & 0 deletions engines/lilliput/script.cpp
Expand Up @@ -2219,8 +2219,10 @@ void LilliputScript::OC_sub17E07() {
_currScript->readUint16LE();

}

void LilliputScript::OC_sub17E15() {
debugC(1, kDebugScript, "OC_sub17E15()");

if ((_word1881B & 0xFF) == 0xFF) {
OC_sub17DB9();
return;
Expand Down Expand Up @@ -2299,6 +2301,7 @@ void LilliputScript::OC_resetByte1714E() {
void LilliputScript::OC_deleteSavegameAndQuit() {
warning("OC_deleteSavegameAndQuit");
}

void LilliputScript::OC_incByte16F04() {
debugC(1, kDebugScript, "OC_incByte16F04()");

Expand All @@ -2316,6 +2319,7 @@ void LilliputScript::OC_sub17BA5() {

void LilliputScript::OC_setByte18823() {
debugC(1, kDebugScript, "OC_setByte18823()");

byte *tmpArr = getCharacterVariablePtr();
_byte18823 = *tmpArr;
}
Expand Down Expand Up @@ -2408,6 +2412,7 @@ void LilliputScript::OC_sub17C0E() {

void LilliputScript::OC_sub17C55() {
debugC(1, kDebugScript, "OC_sub17C55()");

int var1 = getValue1();
int var2 = getValue1();

Expand Down

0 comments on commit 9fc6e8f

Please sign in to comment.