diff --git a/artifacts/ddraw.ini b/artifacts/ddraw.ini index 127a7f39..3039fd04 100644 --- a/artifacts/ddraw.ini +++ b/artifacts/ddraw.ini @@ -1,5 +1,5 @@ ;sfall configuration settings -;v3.8.5 +;v3.8.6 [Main] ;Change to 1 if you want to use command line args to tell sfall to use another ini file. diff --git a/sfall/Bugs.cpp b/sfall/Bugs.cpp index a249fa9d..51b6eefa 100644 --- a/sfall/Bugs.cpp +++ b/sfall/Bugs.cpp @@ -1104,6 +1104,15 @@ end: } } +static void __declspec(naked) partyMemberGetCurLevel_hack() { + __asm { + mov esi, 0xFFFFFFFF; // initialize party member index + mov edi, dword ptr ds:[_partyMemberMaxCount]; + push 0x495FFC; + retn; + } +} + void BugsInit() { @@ -1405,4 +1414,7 @@ void BugsInit() 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); } diff --git a/sfall/version.h b/sfall/version.h index da00b949..904e176a 100644 --- a/sfall/version.h +++ b/sfall/version.h @@ -22,12 +22,12 @@ #define VERSION_MAJOR 3 #define VERSION_MINOR 8 -#define VERSION_BUILD 5 +#define VERSION_BUILD 6 #define VERSION_REV 0 #ifdef WIN2K -#define VERSION_STRING "3.8.5 win2k" +#define VERSION_STRING "3.8.6 win2k" #else -#define VERSION_STRING "3.8.5" +#define VERSION_STRING "3.8.6" #endif #define CHECK_VAL (4)