PATCH wine/controls/button.c paint_button() : "style" range checking

Vincent Pelletier subdino2004 at
Thu Feb 19 11:55:19 CST 2004

Alexandre Julliard wrote:
> If you really want an assertion you should use assert(), at least then
> it can be compiled out. And if it's a condition that can legitimately
> happen, then it has to be handled properly, just adding an ERR doesn't
> improve anything.  In this case I guess it's conceivable that the app
> would change the style to an invalid one, so it needs to be handled.

I wanted to make it somewhat friendlier than a simple message & exit. Or 
I may missunderstand what assert does...
At least, it could be used as a security against that "random code 
execution", and at most it could help devs tracking bugs.
Btw, I suggest adding the source path (relative to wine's root of 
course) & function name in every error message, at least when run in 
trace mode. (I can take care of it if necessary.)

More information about the wine-devel mailing list