Skip to content

Commit 783d88a

Browse files
committed
coreinit: Fix race condition in __FSAIoctlResponseCallback
1 parent 28ea70b commit 783d88a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Cafe/OS/libs/coreinit/coreinit_FS.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -742,7 +742,8 @@ namespace coreinit
742742
}
743743

744744
__FSCmdSubmitResult(cmd, fsStatus);
745-
__FSUpdateQueue(&cmd->fsClientBody->fsCmdQueue);
745+
// dont read from cmd after this point, since the game could already have modified it
746+
__FSUpdateQueue(&client->fsCmdQueue);
746747
osLib_returnFromFunction(hCPU, 0);
747748
}
748749

0 commit comments

Comments
 (0)