From 57544254582c2f3627404e2931bfea251af0b6a7 Mon Sep 17 00:00:00 2001 From: cyanea-bt <150618858+cyanea-bt@users.noreply.github.com> Date: Tue, 23 Jul 2024 01:57:59 +0200 Subject: [PATCH] Windows Port: Fix empty defaults for path settings. (Regression from commit 3511e14. Fixes #817.) --- desmume/src/path.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/desmume/src/path.cpp b/desmume/src/path.cpp index d71b07ecf..6b2b4d852 100644 --- a/desmume/src/path.cpp +++ b/desmume/src/path.cpp @@ -240,7 +240,7 @@ void PathInfo::ReadKeyW(char *pathToRead, const wchar_t *key) if (wcscmp(wpath, key) == 0) { //since the variables are all intialized in this file they all use MAX_PATH char temppath[MAX_PATH]; - temppath[0] = 0; + strcpy(temppath, wcstombs((std::wstring)wpath).c_str()); GetDefaultPath(temppath, wcstombs((std::wstring)key).c_str(), MAX_PATH); wcscpy(wpath,mbstowcs((std::string)temppath).c_str()); }