From 173af709cdaf011b0a3ad9de539bd101766d4c6b Mon Sep 17 00:00:00 2001 From: Steven Smith Date: Wed, 15 Jun 2016 15:35:12 -0700 Subject: [PATCH] Fix 3dsx updating. --- source/core/util.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/source/core/util.c b/source/core/util.c index 813a62b..7749160 100644 --- a/source/core/util.c +++ b/source/core/util.c @@ -383,14 +383,18 @@ int util_compare_file_infos(const void** p1, const void** p2) { } } -static const char* path_3dsx = NULL; +static char path_3dsx[FILE_PATH_MAX]; const char* util_get_3dsx_path() { return path_3dsx; } void util_set_3dsx_path(const char* path) { - path_3dsx = path; + if(strlen(path) >= 5 && strncmp(path, "sdmc:", 5) == 0) { + strncpy(path_3dsx, path + 5, FILE_PATH_MAX); + } else { + strncpy(path_3dsx, path, FILE_PATH_MAX); + } } typedef struct {