mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
Net: Fix memory corruption on save old state.
Can't restore these if they're not inited either.
This commit is contained in:
parent
b5712efdfb
commit
fcaef648ec
3 changed files with 10 additions and 3 deletions
|
@ -683,6 +683,7 @@ int __KernelRegisterActionType(ActionCreator creator)
|
|||
|
||||
void __KernelRestoreActionType(int actionType, ActionCreator creator)
|
||||
{
|
||||
_assert_(actionType >= 0);
|
||||
mipsCalls.restoreActionType(actionType, creator);
|
||||
}
|
||||
|
||||
|
|
|
@ -244,7 +244,9 @@ void __NetDoState(PointerWrap &p) {
|
|||
Do(p, netApctlState);
|
||||
Do(p, netApctlInfo);
|
||||
Do(p, actionAfterApctlMipsCall);
|
||||
__KernelRestoreActionType(actionAfterApctlMipsCall, AfterApctlMipsCall::Create);
|
||||
if (actionAfterApctlMipsCall != -1) {
|
||||
__KernelRestoreActionType(actionAfterApctlMipsCall, AfterApctlMipsCall::Create);
|
||||
}
|
||||
Do(p, apctlThreadHackAddr);
|
||||
Do(p, apctlThreadID);
|
||||
}
|
||||
|
|
|
@ -650,7 +650,9 @@ void __NetAdhocDoState(PointerWrap &p) {
|
|||
|
||||
if (s >= 2) {
|
||||
Do(p, actionAfterMatchingMipsCall);
|
||||
__KernelRestoreActionType(actionAfterMatchingMipsCall, AfterMatchingMipsCall::Create);
|
||||
if (actionAfterMatchingMipsCall != -1) {
|
||||
__KernelRestoreActionType(actionAfterMatchingMipsCall, AfterMatchingMipsCall::Create);
|
||||
}
|
||||
|
||||
Do(p, dummyThreadHackAddr);
|
||||
}
|
||||
|
@ -660,7 +662,9 @@ void __NetAdhocDoState(PointerWrap &p) {
|
|||
}
|
||||
if (s >= 3) {
|
||||
Do(p, actionAfterAdhocMipsCall);
|
||||
__KernelRestoreActionType(actionAfterAdhocMipsCall, AfterAdhocMipsCall::Create);
|
||||
if (actionAfterAdhocMipsCall != -1) {
|
||||
__KernelRestoreActionType(actionAfterAdhocMipsCall, AfterAdhocMipsCall::Create);
|
||||
}
|
||||
|
||||
Do(p, matchingThreadHackAddr);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue