[Scummvm-git-logs] scummvm master -> dcaea3c2555ac2e66ddd825503c89edffa82b5b6
sev-
sev at scummvm.org
Mon Apr 27 21:30:37 UTC 2020
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
dcaea3c255 DRAGONS: Commenting out dangerous code
Commit: dcaea3c2555ac2e66ddd825503c89edffa82b5b6
https://github.com/scummvm/scummvm/commit/dcaea3c2555ac2e66ddd825503c89edffa82b5b6
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2020-04-27T23:27:47+02:00
Commit Message:
DRAGONS: Commenting out dangerous code
These local arrays seems to be unused, but something tells me, that
in fact, in the original they were part of a struct with variable
which follows it used as second element.
These arrays are 10 bytes long, but there is an attempt to copy
600 bytes into them with unsafe strcpy().
If this breaks the game, then these places need a full rework.
Changed paths:
engines/dragons/talk.cpp
diff --git a/engines/dragons/talk.cpp b/engines/dragons/talk.cpp
index 7a4590a88f..752ee2df92 100644
--- a/engines/dragons/talk.cpp
+++ b/engines/dragons/talk.cpp
@@ -539,7 +539,7 @@ bool Talk::talkToActor(ScriptOpCall &scriptOpCall) {
uint16 sequenceId;
TalkDialogEntry *selectedDialogText;
uint iniId;
- short local_990 [5];
+ //short local_990 [5];
uint16 auStack2438 [195];
uint16 local_800 [1000];
Common::Array<TalkDialogEntry *> dialogEntries;
@@ -585,7 +585,7 @@ bool Talk::talkToActor(ScriptOpCall &scriptOpCall) {
return true;
}
_vm->clearFlags(ENGINE_FLAG_8);
- strcpy((char *)local_990, selectedDialogText->dialogText);
+ //strcpy((char *)local_990, selectedDialogText->dialogText);
UTF16ToUTF16Z(auStack2438, (uint16 *)(selectedDialogText->dialogText + 10));
// load_string_from_dragon_txt(selectedDialogText->textIndex1, (char *)local_800);
if (selectedDialogText->hasText) {
@@ -647,7 +647,7 @@ TalkDialogEntry *Talk::displayTalkDialogMenu(Common::Array<TalkDialogEntry*> dia
uint uVar7;
uint16 uVar8;
TalkDialogEntry *talkDialogEntry;
- uint16 local_390[5];
+ //uint16 local_390[5];
uint16 local_386 [195];
uint16 asStack512 [200];
uint16 numEntries;
@@ -672,7 +672,7 @@ TalkDialogEntry *Talk::displayTalkDialogMenu(Common::Array<TalkDialogEntry*> dia
if ((talkDialogEntry->flags & 1) == 0) {
local_60 = local_60 + 1;
talkDialogEntry->yPosMaybe = '\0';
- strcpy((char *)&local_390, (char *)talkDialogEntry->dialogText);
+ //strcpy((char *)&local_390, (char *)talkDialogEntry->dialogText);
UTF16ToUTF16Z(local_386, (uint16 *)(&talkDialogEntry->dialogText[10]));
_dat_80083104 = local_386;
if (*local_386 == 0x20) {
More information about the Scummvm-git-logs
mailing list