Re: [AD] gfx mode selector bugfixes |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
On Thursday 28 April 2005 11:08, Peter Wang wrote:
> 1. See http://www.allegro.cc/forums/view_thread.php?_id=483928
> Patch attached.
Commited.
> 2. Valgrind was able to detect that calls to gfx_mode_select() like this:
>
> void f(void)
> {
> int card, w, h;
> gfx_mode_select(&card, &w, &h);
> }
>
> cause a deference to uninitialised memory. The proposed patch makes
> gfx_mode_select() clobber the contents of the card,w,h before passing
> off to gfx_mode_select_filter(). Also, it makes it more clear that
> gfx_mode_select()'s parameters are only output parameters, whereas for
> gfx_mode_select_ex() and gfx_mode_select_filter() they are in/out
> parameters.
Looks fine to me. Since I was busy anyway, I commited this as well.
Evert