Fix ofn.nFileOffset when multiple files are selected.
authorMike McCormack <mike@codeweavers.com>
Wed, 24 Nov 2004 18:10:24 +0000 (18:10 +0000)
committerAlexandre Julliard <julliard@winehq.org>
Wed, 24 Nov 2004 18:10:24 +0000 (18:10 +0000)
dlls/commdlg/filedlg.c

index 86f8b707105974d1f2759380b446386c7f5fb007..00816c34206da702417414b702144911d78dd0f6 100644 (file)
@@ -1650,7 +1650,7 @@ BOOL FILEDLG95_OnOpenMultipleFiles(HWND hwnd, LPWSTR lpstrFileList, UINT nFileCo
 
     if (ofn->lpstrFile != NULL)
     {
-      WideCharToMultiByte(CP_ACP, 0, lpstrPathSpec, -1,
+      nSizePath = WideCharToMultiByte(CP_ACP, 0, lpstrPathSpec, -1,
                          ofn->lpstrFile, ofn->nMaxFile, NULL, NULL);
       if (ofn->nMaxFile > nSizePath)
       {
@@ -1661,7 +1661,7 @@ BOOL FILEDLG95_OnOpenMultipleFiles(HWND hwnd, LPWSTR lpstrFileList, UINT nFileCo
     }
   }
 
-  fodInfos->ofnInfos->nFileOffset = nSizePath + 1;
+  fodInfos->ofnInfos->nFileOffset = nSizePath;
   fodInfos->ofnInfos->nFileExtension = 0;
 
   if ( !FILEDLG95_SendFileOK(hwnd, fodInfos) )