Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Felix Münchhalfen
wine
Commits
9837b598
Commit
9837b598
authored
25 years ago
by
Marcus Meissner
Committed by
Alexandre Julliard
25 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Replaced some weird C constructs (char[]="" ) with more compatible ones.
Added another NULL ptr check in _OnOpen.
parent
de078696
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dlls/commdlg/filedlg95.c
+17
-8
17 additions, 8 deletions
dlls/commdlg/filedlg95.c
with
17 additions
and
8 deletions
dlls/commdlg/filedlg95.c
+
17
−
8
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
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment