Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
9837b598
Commit
9837b598
authored
Jan 23, 2000
by
Marcus Meissner
Committed by
Alexandre Julliard
Jan 23, 2000
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Replaced some weird C constructs (char[]="" ) with more compatible ones.
Added another NULL ptr check in _OnOpen.
parent
de078696
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
8 deletions
+17
-8
filedlg95.c
dlls/commdlg/filedlg95.c
+17
-8
No files found.
dlls/commdlg/filedlg95.c
View file @
9837b598
...
...
@@ -1085,10 +1085,12 @@ static LRESULT FILEDLG95_InitUI(HWND hwnd)
*/
BOOL
FILEDLG95_OnOpen
(
HWND
hwnd
)
{
char
lpstrSpecifiedByUser
[
MAX_PATH
]
=
""
;
char
lpstrSpecifiedByUser
[
MAX_PATH
];
FileOpenDlgInfos
*
fodInfos
=
(
FileOpenDlgInfos
*
)
GetPropA
(
hwnd
,
FileOpenDlgInfosStr
);
LPITEMIDLIST
pidlSelection
;
lpstrSpecifiedByUser
[
0
]
=
'\0'
;
TRACE
(
"
\n
"
);
/* Check if there is a selected item in the listview */
...
...
@@ -1108,9 +1110,13 @@ BOOL FILEDLG95_OnOpen(HWND hwnd)
LPITEMIDLIST
browsePidl
;
LPSTR
lpstrFileSpec
;
LPSTR
lpstrTemp
;
char
lpstrPathSpec
[
MAX_PATH
]
=
""
;
char
lpstrCurrentDir
[
MAX_PATH
]
=
""
;
char
lpstrPathAndFile
[
MAX_PATH
]
=
""
;
char
lpstrPathSpec
[
MAX_PATH
];
char
lpstrCurrentDir
[
MAX_PATH
];
char
lpstrPathAndFile
[
MAX_PATH
];
lpstrPathSpec
[
0
]
=
'\0'
;
lpstrCurrentDir
[
0
]
=
'\0'
;
lpstrPathAndFile
[
0
]
=
'\0'
;
/* Separate the file spec from the path spec
e.g.:
...
...
@@ -1148,8 +1154,9 @@ BOOL FILEDLG95_OnOpen(HWND hwnd)
case
'.'
:
{
INT
iSize
;
char
lpstrTmp2
[
MAX_PATH
]
=
""
;
char
lpstrTmp2
[
MAX_PATH
];
LPSTR
lpstrTmp
=
strrchr
(
lpstrCurrentDir
,
'\\'
);
iSize
=
lpstrTmp
-
lpstrCurrentDir
;
strncpy
(
lpstrTmp2
,
lpstrCurrentDir
,
iSize
+
1
);
if
(
strlen
(
lpstrSpecifiedByUser
)
<=
3
)
...
...
@@ -1161,7 +1168,8 @@ BOOL FILEDLG95_OnOpen(HWND hwnd)
break
;
default:
{
char
lpstrTmp
[
MAX_PATH
]
=
""
;
char
lpstrTmp
[
MAX_PATH
];
if
(
strcmp
(
&
lpstrCurrentDir
[
strlen
(
lpstrCurrentDir
)
-
1
],
"
\\
"
))
strcat
(
lpstrCurrentDir
,
"
\\
"
);
strcpy
(
lpstrTmp
,
lpstrCurrentDir
);
...
...
@@ -1279,9 +1287,10 @@ BOOL FILEDLG95_OnOpen(HWND hwnd)
{
if
(
strchr
(
lpBuf
,
'.'
))
strcat
(
lpstrFileSpecTemp
,
(
strchr
(
lpBuf
,
'.'
))
+
1
);
}
else
{
if
(
strchr
(
lpBuf
,
'.'
))
strcat
(
lpstrFileSpecTemp
,
strchr
(
lpBuf
,
'.'
));
}
else
strcat
(
lpstrFileSpecTemp
,
strchr
(
lpBuf
,
'.'
));
browsePidl
=
GetPidlFromName
(
fodInfos
->
Shell
.
FOIShellFolder
,
lpstrFileSpecTemp
);
MemFree
((
void
*
)
lpBuf
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment