PolyBezier: the point count must be 3n+1.

This commit is contained in:
Yoshiro Takeno 2004-01-23 22:48:28 +00:00 committed by Alexandre Julliard
parent 72323cb6a9
commit 23be696d40
1 changed files with 5 additions and 1 deletions

View File

@ -695,8 +695,12 @@ BOOL WINAPI FloodFill( HDC hdc, INT x, INT y, COLORREF color )
BOOL WINAPI PolyBezier( HDC hdc, const POINT* lppt, DWORD cPoints )
{
BOOL ret = FALSE;
DC * dc = DC_GetDCUpdate( hdc );
DC * dc;
/* cPoints must be 3 * n + 1 (where n>=1) */
if (cPoints == 1 || (cPoints % 3) != 1) return FALSE;
dc = DC_GetDCUpdate( hdc );
if(!dc) return FALSE;
if(PATH_IsPathOpen(dc->path))