Fix crash when calling partyMemberGetCurLevel_ on a critter that has no data in party.txt.

Updated version number.
This commit is contained in:
NovaRain
2017-10-18 14:54:53 +08:00
parent 74d496845b
commit 94fdfb49ef
3 changed files with 16 additions and 4 deletions
+1 -1
View File
@@ -1,5 +1,5 @@
;sfall configuration settings
;v4.0
;v4.0.1
[Main]
;Change to 1 if you want to use command line args to tell sfall to use another ini file.
+12
View File
@@ -1079,6 +1079,15 @@ end:
}
}
static void __declspec(naked) partyMemberGetCurLevel_hack() {
__asm {
mov esi, 0xFFFFFFFF; // initialize party member index
mov edi, dword ptr ds:[FO_VAR_partyMemberMaxCount];
push 0x495FFC;
retn;
}
}
void BugFixes::init()
{
@@ -1377,6 +1386,9 @@ void BugFixes::init()
HookCall(0x423A99, &compute_attack_hook);
dlogr(" Done", DL_INIT);
//}
// Fix crash when calling partyMemberGetCurLevel_ on a critter that has no data in party.txt
MakeJump(0x495FF6, partyMemberGetCurLevel_hack);
}
}
+3 -3
View File
@@ -24,13 +24,13 @@
#define VERSION_MAJOR 4
#define VERSION_MINOR 0
#define VERSION_BUILD 0
#define VERSION_BUILD 1
#define VERSION_REV 0
#ifdef WIN2K
#define VERSION_STRING "4.0 win2k"
#define VERSION_STRING "4.0.1 win2k"
#else
#define VERSION_STRING "4.0"
#define VERSION_STRING "4.0.1"
#endif
#define CHECK_VAL (4)