Bug 28791: ensure that dashes value is not 0 for PS_USERSTYLE linestyles
Alexandre Julliard
julliard at winehq.org
Wed Oct 19 14:05:12 CDT 2011
damian dixon <damian.dixon at gmail.com> writes:
> diff --git a/dlls/winex11.drv/pen.c b/dlls/winex11.drv/pen.c
> index b677515..71b1bea 100644
> --- a/dlls/winex11.drv/pen.c
> +++ b/dlls/winex11.drv/pen.c
> @@ -108,7 +108,7 @@ HPEN X11DRV_SelectPen( PHYSDEV dev, HPEN hpen )
> case PS_USERSTYLE:
> physDev->pen.dash_len = min(elp->elpNumEntries, MAX_DASHLEN);
> for(i = 0; i < physDev->pen.dash_len ; i++)
> - physDev->pen.dashes[i] = min(elp->elpStyleEntry[i], 255);
> + physDev->pen.dashes[i] = min(elp->elpStyleEntry[i], 255) ? min(elp->elpStyleEntry[i], 255) : 1;
Removing 0 entries (and merging the adjacent entries) would probably be
more correct. It could also use some test cases.
--
Alexandre Julliard
julliard at winehq.org
More information about the wine-devel
mailing list