From 6dbacc6747ac883f8644cacf07fbb30dfa37316c Mon Sep 17 00:00:00 2001 From: chaoskagami Date: Wed, 17 Aug 2016 17:46:17 -0400 Subject: [PATCH] Misc changes (again) --- README.md | 2 +- source/firm/firm.c | 18 ------------------ source/std/memory.c | 4 +++- 3 files changed, 4 insertions(+), 20 deletions(-) diff --git a/README.md b/README.md index 8ca5167..9f2057d 100644 --- a/README.md +++ b/README.md @@ -203,7 +203,7 @@ Credits * Code segment dumping + loading, ideas, and a lot of miscellaneous code. @AuroraWright - * RE work, patches, EmuNAND, and Reboot/Firmlaunch C code. https://github.com/AuroraWright/Luma3ds + * RE work, patches, EmuNAND, SVC replacement/injection, and Reboot/Firmlaunch C code. https://github.com/AuroraWright/Luma3ds @Reisyukaku * For the 'Force TestMenu' patch, and RE work. Also coded ReiNand, which some parts of Luma are derived from and thus some parts of this. diff --git a/source/firm/firm.c b/source/firm/firm.c index 171dc36..bc2be84 100644 --- a/source/firm/firm.c +++ b/source/firm/firm.c @@ -409,24 +409,6 @@ load_firm(firm_h *dest, char *path, char *path_firmkey, char *path_cetk, uint32_ return 0; } -// FAIR WARNING; This function is arm11 code, not ARM9. -// They share enough in common that this isn't a problem, -// but still worth documenting. -void __attribute__((naked)) arm11_preboot_halt() -{ - *a11_entry = 0; // Don't wait for us - - // Disables the LCD. - *(volatile uint32_t *)0x10202A44 = 0; - *(volatile uint32_t *)0x10202244 = 0; - *(volatile uint32_t *)0x1020200C = 0; - *(volatile uint32_t *)0x10202014 = 0; - - while (!*a11_entry) - ; - ((void (*)()) * a11_entry)(); -} - extern void wait(); __attribute__ ((noreturn)) diff --git a/source/std/memory.c b/source/std/memory.c index d015dae..fa30d53 100644 --- a/source/std/memory.c +++ b/source/std/memory.c @@ -128,8 +128,10 @@ int atoi(const char *str) { int res = 0; + while (str[0] && str[0] >= '0' && str[0] <= '9') { - res = str[0] - '0' + res * 10; + res *= 10; + res += str[0] - '0'; str++; } -- 2.39.5