Fixed crash on game save (due to commit 13e0348c)

This commit is contained in:
NovaRain
2024-06-09 06:26:10 +08:00
parent fd0bd975fd
commit f12f39bef0
+6 -2
View File
@@ -300,7 +300,9 @@ static void __stdcall SetHeroArt(bool newArtFlag) {
// return hero art val to normal before saving
static __declspec(naked) void SavCritNumFix() {
__asm {
pushadc;
push ecx;
push edx;
push eax;
push 0; // set hero FrmID LST index to normal range before saving
call SetHeroArt;
pop eax;
@@ -308,7 +310,9 @@ static __declspec(naked) void SavCritNumFix() {
push eax;
push 1; // return hero FrmID LST index back to hero art range after saving hero state structure
call SetHeroArt;
popadc;
pop eax;
pop edx;
pop ecx;
retn;
}
}