From 379db68839b438712e37ae36b356f57252a13aa6 Mon Sep 17 00:00:00 2001 From: Edoardo Lolletti Date: Sat, 27 Apr 2024 13:09:03 +0200 Subject: [PATCH] Fix offsets --- arm9/src/deviceList.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/arm9/src/deviceList.c b/arm9/src/deviceList.c index 584c0bc..498a2cc 100644 --- a/arm9/src/deviceList.c +++ b/arm9/src/deviceList.c @@ -44,11 +44,10 @@ DeviceList* getDeviceList(void) if(isSd) { //transform the root path to sd:/ (can be sdmc:/, nand:/, nand2:/, etc) - memmove(list->appname + (deviceNameLen - 2), list->appname + deviceNameLen, sizeof(list->appname) - deviceNameLen); + memmove(list->appname + 2, list->appname + deviceNameLen, sizeof(list->appname) - deviceNameLen); list->appname[0] = 's'; list->appname[1] = 'd'; - list->appname[sizeof(list->appname) - 1] = '\0'; - list->appname[sizeof(list->appname) - 2] = '\0'; + memset(list->appname + (sizeof(list->appname) - deviceNameLen + 2), 0, deviceNameLen - 2); } gotDeviceList = true; }