Skip to content
This repository has been archived by the owner on Apr 24, 2020. It is now read-only.

Commit

Permalink
Fix crash on fw 9.1.0+
Browse files Browse the repository at this point in the history
This crash was because on fw 9.1.0+, the number of sessions for pctl was limited to one for the applet. This meant that if another session was open when trying to launch the appley (in this case, change the pin), it would fatal.

Thank you to Behemoth for finding this issue and thanks to WerWolv for telling me about it. Also thanks to Daniel C for testing this fix for me.
  • Loading branch information
ITotalJustice committed Jan 25, 2020
1 parent 54b0a97 commit 1f9a316
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ include $(DEVKITPRO)/libnx/switch_rules

APP_TITLE := Reset Parental Controls
APP_AUTHOR := TotalJustice
APP_VERSION := 1.1.0
APP_VERSION := 1.1.1

TARGET := reset_parental_controls
BUILD := build
Expand Down
6 changes: 5 additions & 1 deletion source/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -151,14 +151,18 @@ int main(int argc, char *argv[])

if (k & KEY_A)
{
if (R_FAILED(pctlauthChangePasscode()))
pctlExit();

if (R_FAILED(pctlauthRegisterPasscode()))
{
print_display("Failed to change passcode\n\n");
}
else
{
print_display("\n\n\n\nParental control pin succesfully set!\n\n\n\n");
}

pctlInitialize();
}

if (k & KEY_X)
Expand Down

1 comment on commit 1f9a316

@DanielC7205
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also thanks to Daniel C for testing this fix for me.

Yay that is me!

Please sign in to comment.