The API call to the file selector left some fields in the OPENFILENAME
struct that was passed to it as argument uninitialized. It seems this
could crash WinBoard if they contained unlcky values. (Which they might,
as the struct was a local variable.)
ofn.hwndOwner = hDlg;\r
ofn.hInstance = hInst;\r
ofn.lpstrFilter = filter;\r
+ ofn.lpstrCustomFilter = (LPSTR) NULL;\r
ofn.nFilterIndex = 1L + (ext = activeCps ? 0 : activeList[layoutList[(i-2000)/2+1]].max & 31);\r
+ ofn.lpstrFileTitle = NULL;\r
+ ofn.lpstrInitialDir = NULL;\r
ofn.lpstrDefExt = defaultExt[ext];\r
ofn.lpstrFile = buf;\r
ofn.nMaxFile = sizeof(buf);\r