forked from Mirrors/wine-wine
Fixed crash in open file dialog on non-windows 98 emulation when
lpszInitialDir is null.oldstable
parent
99b3307406
commit
07e2634753
|
@ -1124,7 +1124,14 @@ static LRESULT FILEDLG95_InitControls(HWND hwnd)
|
|||
if (result) {
|
||||
strcpy(fodInfos->ofnInfos->lpstrFile, nameBit);
|
||||
*nameBit = 0x00;
|
||||
if (fodInfos->ofnInfos->lpstrInitialDir == NULL) {
|
||||
initDir = MemAlloc(strlen(tmpBuf) + 1);
|
||||
fodInfos->ofnInfos->lpstrInitialDir = initDir;
|
||||
strcpy(initDir, tmpBuf);
|
||||
handledPath = TRUE;
|
||||
} else {
|
||||
strcpy((LPSTR)fodInfos->ofnInfos->lpstrInitialDir, tmpBuf);
|
||||
}
|
||||
handledPath = TRUE;
|
||||
TRACE("Value in lpstrFile includes path, overriding lpstrInitialDir: %s, %s\n",
|
||||
fodInfos->ofnInfos->lpstrFile, fodInfos->ofnInfos->lpstrInitialDir);
|
||||
|
|
Loading…
Reference in New Issue