Minnor fix to filedlg.c
Carlos
clozano at andago.com
Sat Oct 12 06:43:42 CDT 2002
Changelog:
* dlls/commdlg/filedlg.c
Avoid crashes when ofnW->lpstrFile is null.
cya.
--
____________________________________________________
___ _____ _ ____
/ __// _ // / / o) clozano
/ /_ / /_/ // /_ / \ @andago.com
/___//_/ /_//___//__)
____________________________________________________
-------------- next part --------------
Index: dlls/commdlg/filedlg.c
===================================================================
RCS file: /home/wine/wine/dlls/commdlg/filedlg.c,v
retrieving revision 1.54
diff -u -r1.54 filedlg.c
--- dlls/commdlg/filedlg.c 10 Oct 2002 21:22:11 -0000 1.54
+++ dlls/commdlg/filedlg.c 12 Oct 2002 11:42:43 -0000
@@ -687,7 +687,8 @@
{
if (!WideCharToMultiByte( CP_ACP, 0, ofnW->lpstrFile, -1,
lfs->ofnA->lpstrFile, ofnW->nMaxFile, NULL, NULL ))
- lfs->ofnA->lpstrFile[ofnW->nMaxFile-1] = 0;
+ if (ofnW->nMaxFile)
+ lfs->ofnA->lpstrFile[ofnW->nMaxFile-1] = 0;
lfs->ofnA->nFileOffset = ofnW->nFileOffset;
lfs->ofnA->nFileExtension = ofnW->nFileExtension;
}
More information about the wine-patches
mailing list