Skip to content

Commit 5786cfb

Browse files
committed
Fix crash when calling partyMemberGetCurLevel_ on a critter that has no data in party.txt.
Updated version number.
1 parent 78dfb53 commit 5786cfb

File tree

3 files changed

+16
-4
lines changed

3 files changed

+16
-4
lines changed

artifacts/ddraw.ini

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
;sfall configuration settings
2-
;v3.8.5
2+
;v3.8.6
33

44
[Main]
55
;Change to 1 if you want to use command line args to tell sfall to use another ini file.

sfall/Bugs.cpp

+12
Original file line numberDiff line numberDiff line change
@@ -1104,6 +1104,15 @@ static void __declspec(naked) compute_attack_hook() {
11041104
}
11051105
}
11061106

1107+
static void __declspec(naked) partyMemberGetCurLevel_hack() {
1108+
__asm {
1109+
mov esi, 0xFFFFFFFF; // initialize party member index
1110+
mov edi, dword ptr ds:[_partyMemberMaxCount];
1111+
push 0x495FFC;
1112+
retn;
1113+
}
1114+
}
1115+
11071116

11081117
void BugsInit()
11091118
{
@@ -1405,4 +1414,7 @@ void BugsInit()
14051414
HookCall(0x423A99, &compute_attack_hook);
14061415
dlogr(" Done", DL_INIT);
14071416
//}
1417+
1418+
// Fix crash when calling partyMemberGetCurLevel_ on a critter that has no data in party.txt
1419+
MakeJump(0x495FF6, partyMemberGetCurLevel_hack);
14081420
}

sfall/version.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,12 @@
2222

2323
#define VERSION_MAJOR 3
2424
#define VERSION_MINOR 8
25-
#define VERSION_BUILD 5
25+
#define VERSION_BUILD 6
2626
#define VERSION_REV 0
2727
#ifdef WIN2K
28-
#define VERSION_STRING "3.8.5 win2k"
28+
#define VERSION_STRING "3.8.6 win2k"
2929
#else
30-
#define VERSION_STRING "3.8.5"
30+
#define VERSION_STRING "3.8.6"
3131
#endif
3232

3333
#define CHECK_VAL (4)

0 commit comments

Comments
 (0)