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
a44a6083
Commit
a44a6083
authored
Mar 12, 2017
by
Nikolay Sivov
Committed by
Alexandre Julliard
Mar 13, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comdlg32: Take nMaxFile into account when converting A->W.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
6e5a0777
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
2 deletions
+10
-2
filedlg.c
dlls/comdlg32/filedlg.c
+10
-2
No files found.
dlls/comdlg32/filedlg.c
View file @
a44a6083
...
...
@@ -383,18 +383,26 @@ static void init_filedlg_infoW(OPENFILENAMEW *ofn, FileOpenDlgInfos *info)
static
void
init_filedlg_infoA
(
OPENFILENAMEA
*
ofn
,
FileOpenDlgInfos
*
info
)
{
OPENFILENAMEW
ofnW
;
int
len
;
ofnW
=
*
(
OPENFILENAMEW
*
)
ofn
;
ofnW
.
lpstrInitialDir
=
heap_strdupAtoW
(
ofn
->
lpstrInitialDir
);
ofnW
.
lpstrFile
=
heap_strdupAtoW
(
ofn
->
lpstrFile
);
ofnW
.
lpstrDefExt
=
heap_strdupAtoW
(
ofn
->
lpstrDefExt
);
ofnW
.
lpstrTitle
=
heap_strdupAtoW
(
ofn
->
lpstrTitle
);
if
(
ofn
->
lpstrFile
)
{
len
=
MultiByteToWideChar
(
CP_ACP
,
0
,
ofn
->
lpstrFile
,
ofn
->
nMaxFile
,
NULL
,
0
);
ofnW
.
lpstrFile
=
MemAlloc
(
len
*
sizeof
(
WCHAR
));
MultiByteToWideChar
(
CP_ACP
,
0
,
ofn
->
lpstrFile
,
ofn
->
nMaxFile
,
ofnW
.
lpstrFile
,
len
);
ofnW
.
nMaxFile
=
len
;
}
if
(
ofn
->
lpstrFilter
)
{
int
n
,
len
;
LPCSTR
s
;
int
n
;
/* filter is a list... title\0ext\0......\0\0 */
s
=
ofn
->
lpstrFilter
;
...
...
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