From b5a877981487c2899dfaafc22ec1043f7fa36b95 Mon Sep 17 00:00:00 2001 From: Mike McCormack Date: Wed, 24 Nov 2004 18:10:24 +0000 Subject: [PATCH] Fix ofn.nFileOffset when multiple files are selected. --- dlls/commdlg/filedlg.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/commdlg/filedlg.c b/dlls/commdlg/filedlg.c index 86f8b707105..00816c34206 100644 --- a/dlls/commdlg/filedlg.c +++ b/dlls/commdlg/filedlg.c @@ -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) )