From ff2de2bc58c9933d54ffb0fe5668b8e8197ec239 Mon Sep 17 00:00:00 2001 From: gocha Date: Sun, 12 Jul 2009 06:01:30 +0000 Subject: [PATCH] win32: fix a glitch that the GetOpenFileName dialog for AVI doesn't appear when the last character of avi output path is '\\'. --- desmume/src/windows/pathsettings.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/desmume/src/windows/pathsettings.cpp b/desmume/src/windows/pathsettings.cpp index eda860c05..8b7789077 100644 --- a/desmume/src/windows/pathsettings.cpp +++ b/desmume/src/windows/pathsettings.cpp @@ -173,7 +173,9 @@ void SwitchPath(Action action, KnownPath path, char * buffer, int maxCount) if(action == GET) { strncpy(buffer, pathToCopy, maxCount); - strcat(buffer, "\\"); + int len = strlen(buffer)-1; + if(buffer[len] != '\\') + strcat(buffer, "\\"); } else if(action == SET) {