[Bug 33009] New: Logical error in code isStateDirty
wine-bugs at winehq.org
wine-bugs at winehq.org
Mon Feb 18 15:03:39 CST 2013
http://bugs.winehq.org/show_bug.cgi?id=33009
Bug #: 33009
Summary: Logical error in code isStateDirty
Product: Wine
Version: unspecified
Platform: x86
OS/Version: Mac OS X
Status: UNCONFIRMED
Severity: major
Priority: P2
Component: directx-d3d
AssignedTo: wine-bugs at winehq.org
ReportedBy: roman.marusyk at gmail.com
Classification: Unclassified
wined3d_private.h have a
static inline BOOL isStateDirty(const struct wined3d_context *context, DWORD
state)
....
(line 1792) return context->isStateDirty[idx] & (1 << shift);
sizeof(BOOL) is not always a 32bits
if someone compile and built only wined3d on macos
BOOL is typedef char BOOL;
and code
return x & (1 << shift) very bad
for example
return x & (1 << 24) is a return x & (0x01000000)
if BOOL is typedef char , we have always return FALSE
anyway, better write
return (context->isStateDirty[idx] & (1 << shift)) != 0;
--
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