Commit e6f19301 authored by Huw Davies's avatar Huw Davies Committed by Alexandre Julliard

gdi32: Simplify the point type checking logic.

parent 8e2bc1eb
...@@ -152,12 +152,11 @@ BOOL nulldrv_PolyDraw( PHYSDEV dev, const POINT *points, const BYTE *types, DWOR ...@@ -152,12 +152,11 @@ BOOL nulldrv_PolyDraw( PHYSDEV dev, const POINT *points, const BYTE *types, DWOR
case PT_LINETO: case PT_LINETO:
break; break;
case PT_BEZIERTO: case PT_BEZIERTO:
if((i + 2 < count) && (types[i + 1] == PT_BEZIERTO) && if (i + 2 >= count) return FALSE;
((types[i + 2] & ~PT_CLOSEFIGURE) == PT_BEZIERTO)) if (types[i + 1] != PT_BEZIERTO) return FALSE;
{ if ((types[i + 2] & ~PT_CLOSEFIGURE) != PT_BEZIERTO) return FALSE;
i += 2; i += 2;
break; break;
}
default: default:
return FALSE; return FALSE;
} }
......
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