[Bug 28791] New: XSetDashes is being passed 0 as one of the dashes causing a BadValue Error
wine-bugs at winehq.org
wine-bugs at winehq.org
Tue Oct 18 10:56:48 CDT 2011
http://bugs.winehq.org/show_bug.cgi?id=28791
Bug #: 28791
Summary: XSetDashes is being passed 0 as one of the dashes
causing a BadValue Error
Product: Wine
Version: 1.3.30
Platform: x86
OS/Version: Linux
Status: UNCONFIRMED
Severity: critical
Priority: P2
Component: winex11.drv
AssignedTo: wine-bugs at winehq.org
ReportedBy: damian.dixon at gmail.com
Classification: Unclassified
Created attachment 36985
--> http://bugs.winehq.org/attachment.cgi?id=36985
backtrace in winedbg with +synchronous set
Wine should either check the dash values in X11DRV_SetupGCForPen.
I suspect that ideally the code that sets a linestyle up should ensure the dash
values are in range for X11.
The particular sequence I am seeing is '0 3 13 0'. It is the '0' that causes
the BadValue.
Looking in pen.c (X11DRV_SelectPen, line 108) the recent PS_USERSTYLE change is
not complete:
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);
I believe that the code should be:
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) ?
min(elp->elpStyleEntry[i], 255) : 1;
This simple change works for the application I am testing.
--
Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email
Do not reply to this email, post in Bugzilla using the
above URL to reply.
------- You are receiving this mail because: -------
You are watching all bug changes.
More information about the wine-bugs
mailing list