From f214b2e535cb303b54de44a08f9a178bb4875373 Mon Sep 17 00:00:00 2001 From: Dave Murphy Date: Fri, 11 May 2018 02:49:39 +0100 Subject: [PATCH] fix for gcc 8.1.0 --- libctru/source/sdmc_dev.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libctru/source/sdmc_dev.c b/libctru/source/sdmc_dev.c index bc0f4a8..e3da7fb 100644 --- a/libctru/source/sdmc_dev.c +++ b/libctru/source/sdmc_dev.c @@ -150,6 +150,7 @@ sdmc_fixpath(struct _reent *r, else { strncpy(__fixedpath, __cwd, PATH_MAX); + __fixedpath[PATH_MAX] = '\0'; strncat(__fixedpath, path, PATH_MAX); } @@ -820,6 +821,7 @@ sdmc_chdir(struct _reent *r, { FSDIR_Close(fd); strncpy(__cwd, __fixedpath, PATH_MAX); + __cwd[PATH_MAX] = '\0'; return 0; }