Skip to content

Commit

Permalink
patches/act: Fix crash with no accounts
Browse files Browse the repository at this point in the history
This ACT patch changes a function with counts the number of accounts of
the system to always report 1 account. If there are no accounts, such as
on a system format or on a fresh Citra instance, this would make the
sysmodule try to read from non-existent data.

We replace the patch to allow the sysmodule to enter the counting loop,
but only once. After finishing the loop, we jump out of it to the end
and return the count.
  • Loading branch information
DaniElectra committed Jan 14, 2024
1 parent 58e8abb commit fc37e09
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions patches/act/src/main.s
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@
.include "src/account_url.s"

; Prevent unused accounts from being deleted on act start
.org 0x114f8c
mov r0, #1
bx lr
.org 0x114f98
b 0x114fa8

.close

0 comments on commit fc37e09

Please # to comment.