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
0ce0bef9
Commit
0ce0bef9
authored
Jul 27, 2001
by
Andreas Mohr
Committed by
Alexandre Julliard
Jul 27, 2001
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't crash if DeviceCapabilities(DC_PAPERNAMES) fails.
parent
9dd5b163
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
3 deletions
+8
-3
printdlg.c
dlls/commdlg/printdlg.c
+8
-3
No files found.
dlls/commdlg/printdlg.c
View file @
0ce0bef9
...
...
@@ -377,7 +377,7 @@ static BOOL PRINTDLG_PaperSize(
DEVMODEA
*
dm
;
LPSTR
devname
,
portname
;
int
i
;
DWORD
NrOfEntries
,
ret
;
INT
NrOfEntries
,
ret
;
char
*
Names
=
NULL
;
POINT
*
points
=
NULL
;
BOOL
retval
=
FALSE
;
...
...
@@ -393,9 +393,14 @@ static BOOL PRINTDLG_PaperSize(
FIXME
(
"No papernames found for %s/%s
\n
"
,
devname
,
portname
);
goto
out
;
}
if
(
NrOfEntries
==
-
1
)
{
ERR
(
"Hmm ? DeviceCapabilities() DC_PAPERNAMES failed, ret -1 !
\n
"
);
goto
out
;
}
Names
=
(
char
*
)
HeapAlloc
(
GetProcessHeap
(),
0
,
NrOfEntries
*
64
);
if
(
NrOfEntries
!=
(
ret
=
DeviceCapabilitiesA
(
devname
,
portname
,
DC_PAPERNAMES
,
Names
,
dm
)))
{
FIXME
(
"Number of returned vals %
ld is not %l
d
\n
"
,
NrOfEntries
,
ret
);
FIXME
(
"Number of returned vals %
d is not %
d
\n
"
,
NrOfEntries
,
ret
);
goto
out
;
}
for
(
i
=
0
;
i
<
NrOfEntries
;
i
++
)
...
...
@@ -408,7 +413,7 @@ static BOOL PRINTDLG_PaperSize(
}
points
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
points
[
0
])
*
NrOfEntries
);
if
(
NrOfEntries
!=
(
ret
=
DeviceCapabilitiesA
(
devname
,
portname
,
DC_PAPERSIZE
,(
LPBYTE
)
points
,
dm
)))
{
FIXME
(
"Number of returned sizes %
ld is not %l
d?
\n
"
,
NrOfEntries
,
ret
);
FIXME
(
"Number of returned sizes %
d is not %
d?
\n
"
,
NrOfEntries
,
ret
);
goto
out
;
}
/* this is _10ths_ of a millimeter */
...
...
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