[PATCH] d3dx9: Don't check for negative enum value.

Matteo Bruni matteo.mystral at gmail.com
Tue Mar 24 10:57:46 CDT 2020

On Tue, Mar 24, 2020 at 4:54 PM Paul Gofman <gofmanp at gmail.com> wrote:
> On 3/24/20 18:29, Matteo Bruni wrote:
> > I do think that the assert with ARRAY_SIZE() is nicer than the
> > previous if and it's not a performance concern (you're supposed to
> > compile with -DNDEBUG if you really care about performance). But you
> > bring a good point in that we should also check that state->operation
> > doesn't overrun state_table[]. That one should be checked at parse
> > time and it should be a normal if () + WARN(), since it depends on the
> > effect data. Care to send a patch? :)
> Yes, sure. I guess besides WARN it would make sense to fail effect
> creation if we meet an unexpected state operation.

Yep, agreed.

More information about the wine-devel mailing list