Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
51f5308d
Commit
51f5308d
authored
May 19, 2003
by
Mike McCormack
Committed by
Alexandre Julliard
May 19, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix an uninitialized buffer.
parent
84580401
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
5 deletions
+6
-5
view.c
programs/view/view.c
+6
-5
No files found.
programs/view/view.c
View file @
51f5308d
...
...
@@ -41,15 +41,18 @@ int deltax = 0, deltay = 0;
int
width
=
0
,
height
=
0
;
BOOL
isAldus
;
BOOL
FileOpen
(
HWND
hWnd
,
char
*
fn
)
BOOL
FileOpen
(
HWND
hWnd
,
char
*
fn
,
int
fnsz
)
{
OPENFILENAME
ofn
=
{
sizeof
(
OPENFILENAME
),
0
,
0
,
NULL
,
NULL
,
0
,
0
,
NULL
,
FN_LENGTH
,
NULL
,
0
,
NULL
,
NULL
,
OFN_CREATEPROMPT
|
fnsz
,
NULL
,
0
,
NULL
,
NULL
,
OFN_SHOWHELP
,
0
,
0
,
NULL
,
0
,
NULL
};
ofn
.
lpstrFilter
=
"Metafiles
\0
*.wmf
\0
"
;
ofn
.
hwndOwner
=
hWnd
;
ofn
.
lpstrFile
=
fn
;
if
(
fnsz
<
1
)
return
FALSE
;
*
fn
=
0
;
return
GetOpenFileName
(
&
ofn
);
}
...
...
@@ -84,7 +87,7 @@ LRESULT CALLBACK WndProc(HWND hwnd,
case
IDM_OPEN
:
{
char
filename
[
FN_LENGTH
];
if
(
FileOpen
(
hwnd
,
filename
))
{
if
(
FileOpen
(
hwnd
,
filename
,
FN_LENGTH
))
{
isAldus
=
FileIsPlaceable
(
filename
);
if
(
isAldus
)
{
hmf
=
GetPlaceableMetaFile
(
hwnd
,
filename
);
...
...
@@ -222,5 +225,3 @@ HMETAFILE GetPlaceableMetaFile( HWND hwnd, LPCSTR szFileName )
deltay
=
0
;
return
hmf
;
}
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