Commit def42026 authored by Misha Koshelev's avatar Misha Koshelev Committed by Alexandre Julliard

gdi32: Slightly simplify result handling in PolyDraw.

parent c208c3b9
...@@ -823,7 +823,7 @@ BOOL WINAPI PolyDraw(HDC hdc, const POINT *lppt, const BYTE *lpbTypes, ...@@ -823,7 +823,7 @@ BOOL WINAPI PolyDraw(HDC hdc, const POINT *lppt, const BYTE *lpbTypes,
DWORD cCount) DWORD cCount)
{ {
DC *dc; DC *dc;
BOOL result; BOOL result = FALSE;
POINT lastmove; POINT lastmove;
unsigned int i; unsigned int i;
...@@ -841,10 +841,8 @@ BOOL WINAPI PolyDraw(HDC hdc, const POINT *lppt, const BYTE *lpbTypes, ...@@ -841,10 +841,8 @@ BOOL WINAPI PolyDraw(HDC hdc, const POINT *lppt, const BYTE *lpbTypes,
if( lpbTypes[i] != PT_MOVETO && if( lpbTypes[i] != PT_MOVETO &&
lpbTypes[i] & PT_BEZIERTO ) lpbTypes[i] & PT_BEZIERTO )
{ {
if( cCount < i+3 ){ if( cCount < i+3 )
result = FALSE; goto end;
goto end;
}
else else
i += 2; i += 2;
} }
...@@ -869,10 +867,8 @@ BOOL WINAPI PolyDraw(HDC hdc, const POINT *lppt, const BYTE *lpbTypes, ...@@ -869,10 +867,8 @@ BOOL WINAPI PolyDraw(HDC hdc, const POINT *lppt, const BYTE *lpbTypes,
PolyBezierTo( hdc, &lppt[i], 3 ); PolyBezierTo( hdc, &lppt[i], 3 );
i += 2; i += 2;
} }
else{ else
result = FALSE; goto end;
goto end;
}
if( lpbTypes[i] & PT_CLOSEFIGURE ) if( lpbTypes[i] & PT_CLOSEFIGURE )
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment