]> Chaos Git - corbenik/corbenik.git/commitdiff
Ugh, minor hiccup when porting TuxSH's changes. Basically, we would svcbreak every...
authorchaoskagami <chaos.kagami@gmail.com>
Mon, 23 May 2016 06:51:15 +0000 (02:51 -0400)
committerchaoskagami <chaos.kagami@gmail.com>
Mon, 23 May 2016 06:51:15 +0000 (02:51 -0400)
external/loader/source/loader.c
external/loader/source/patcher.c

index bcf568361a02acb04d01863d22a6c9c339e8daa9..c6075e607e127207c8a95f7e786d971468d5154a 100644 (file)
@@ -118,7 +118,8 @@ static Result load_code(u64 progid, prog_addrs_t *shared, prog_addrs_t *original
   path.type = PATH_BINARY;
   path.data = CODE_PATH;
   path.size = sizeof(CODE_PATH);
-  if (R_FAILED(IFile_Open(&file, ARCHIVE_SAVEDATA_AND_CONTENT2, archivePath, path, FS_OPEN_READ))) svcBreak(USERBREAK_ASSERT);
+
+  if (R_FAILED(IFile_Open(&file, ARCHIVE_SAVEDATA_AND_CONTENT2, archivePath, path, FS_OPEN_READ)))
   {
     svcBreak(USERBREAK_ASSERT);
   }
index 665540041cdbffcbe40ddf5e815809a82276b6c9..ef0cd652aad1be8aab7224948e40f186552c7b6a 100644 (file)
@@ -90,13 +90,13 @@ static int fileOpen(IFile *file, FS_ArchiveID id, const char *path, int flags)
     FS_Path apath;
     FS_Path ppath;
 
-    size_t len = strnlen(path, PATH_MAX);
     apath.type = PATH_EMPTY;
     apath.size = 1;
     apath.data = (u8 *)"";
+
     ppath.type = PATH_ASCII;
     ppath.data = path;
-    ppath.size = len + 1;
+    ppath.size = strnlen(path, PATH_MAX) + 1;
 
        return IFile_Open(file, id, apath, ppath, flags);
 }