From 689833db39099c8a7681eff97ab9957aeea76f05 Mon Sep 17 00:00:00 2001 From: fledge68 Date: Mon, 18 Feb 2013 12:05:18 +0000 Subject: [PATCH] _ Fix for installing wii games --- source/loader/wbfs_ext.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/source/loader/wbfs_ext.c b/source/loader/wbfs_ext.c index 05a4c6ea..9a747959 100644 --- a/source/loader/wbfs_ext.c +++ b/source/loader/wbfs_ext.c @@ -29,6 +29,7 @@ #define TITLE_LEN 64 +char wbfs_drive_tmp[16]; char wbfs_fs_drive[16]; char invalid_path[] = "/\\:|<>?*\"'"; @@ -186,7 +187,8 @@ s32 WBFS_Ext_AddGame(progress_callback_t spinner, void *spinner_data) asprintf(&cleantitle, header.title); for(cp = strpbrk(cleantitle, illegal); cp; cp = strpbrk(cp, illegal)) *cp = '_'; - strncpy(folder, fmt(wii_games_dir, wbfs_fs_drive), sizeof(folder)); + strncpy(wbfs_drive_tmp, wbfs_fs_drive, strlen(wbfs_fs_drive) - 1); + strncpy(folder, fmt(wii_games_dir, wbfs_drive_tmp), sizeof(folder)); fsop_MakeFolder(folder); strncpy(folder, fmt("%s/%s [%s]", folder, cleantitle, header.id), sizeof(folder)); fsop_MakeFolder(folder);