From c91921616e4a8f4aa79178e717ae65ed03459d6e Mon Sep 17 00:00:00 2001 From: yellows8 Date: Mon, 24 Nov 2014 22:58:07 -0500 Subject: [PATCH] Fixed svcWaitSynchronizationN, previously this didn't save/restore r4 on the stack. --- libctru/source/svc.s | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/libctru/source/svc.s b/libctru/source/svc.s index f918369..43457aa 100644 --- a/libctru/source/svc.s +++ b/libctru/source/svc.s @@ -187,11 +187,13 @@ svcWaitSynchronization: .type svcWaitSynchronizationN, %function svcWaitSynchronizationN: str r5, [sp, #-4]! + str r4, [sp, #-4]! mov r5, r0 - ldr r0, [sp, #0x4] - ldr r4, [sp, #0x4+0x4] + ldr r0, [sp, #0x8] + ldr r4, [sp, #0x8+0x4] svc 0x25 str r1, [r5] + ldr r4, [sp], #4 ldr r5, [sp], #4 bx lr