gdiplus: make GdipSetPenDashArray return OutOfMemory on (count <= 0) (like native)
Nikolay Sivov
bunglehead at gmail.com
Mon May 12 17:35:17 CDT 2008
Changelog:
- native version returns OutOfMemory when (count <= 0) and pointers are valid.
---
dlls/gdiplus/pen.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/dlls/gdiplus/pen.c b/dlls/gdiplus/pen.c
index 7a692e3..a8ec531 100644
--- a/dlls/gdiplus/pen.c
+++ b/dlls/gdiplus/pen.c
@@ -251,6 +251,10 @@ GpStatus WINGDIPAPI GdipSetPenDashArray(GpPen *pen, GDIPCONST REAL *dash,
if(!pen || !dash)
return InvalidParameter;
+ /* native behaviour */
+ if(count <= 0)
+ return OutOfMemory;
+
for(i = 0; i < count; i++){
sum += dash[i];
if(dash[i] < 0.0)
--
1.4.4.4
More information about the wine-patches
mailing list