win32: fix a glitch that the GetOpenFileName dialog for AVI doesn't appear when the last character of avi output path is '\\'.

This commit is contained in:
gocha 2009-07-12 06:01:30 +00:00
parent e5979f2bc1
commit ff2de2bc58
1 changed files with 3 additions and 1 deletions

View File

@ -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)
{