Fixed "out of bounds" bug when printing the automap list.

This commit is contained in:
NovaRain
2019-04-01 21:22:27 +08:00
parent 5d7ee90f71
commit 3c47288e70
2 changed files with 14 additions and 1 deletions
+13
View File
@@ -2004,6 +2004,16 @@ static void __declspec(naked) obj_load_dude_hook1() {
}
}
static void __declspec(naked) PrintAMList_hook() {
__asm {
cmp ebp, 20; // max line count
jle skip;
mov ebp, 20;
skip:
jmp qsort_;
}
}
void BugsInit()
{
// fix vanilla negate operator on float values
@@ -2531,4 +2541,7 @@ void BugsInit()
HookCall(0x48D666, obj_load_dude_hook1);
BlockCall(0x48D675);
BlockCall(0x48D69D);
// Fix "out of bounds" bug when printing the automap list
HookCall(0x499240, PrintAMList_hook);
}
+1 -1
View File
@@ -483,6 +483,6 @@ void QuestListInit() {
dlogr(" Done", DL_INIT);
} else {
HookCall(0x498186, PipStatus_hook_printfix); // fix "out of range" bug when printing a list of quests
HookCall(0x498186, PipStatus_hook_printfix); // fix "out of bounds" bug when printing a list of quests
}
}