[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [MiNT] How can evnt_multi cause an illegal access?



On Saturday 12 January 2013 16:40:57 Roger Burrows wrote:
> On 12 Jan 2013 at 22:06, Miro Kropácek wrote:
> > I realize this is a little bit vague but I'm really out of ideas. How can
> > this:
> > 
> > event = evnt_multi( MU_KEYBD | MU_MESAG | MU_BUTTON | MU_TIMER,
> > 2, LEFT_BUTTON, 1, /* bclicks, bmask, bstate -- not used */
> > 0, 0, 0, 0, 0, /* m1flag, m1x, m1y, m1w, m1h -- not used */
> > 0, 0, 0, 0, 0, /* m2flag, m2x, m2y, m2w, m2h -- not used */
> > g_msgBuffer,
> > 250, /* 250 ms = 0.25 second */
> > &mx, &my, &mb, /* mouse x, mouse y, mouse button */
> > &kstate, &key, /* shift state, key pressed */
> > &mc ); /* how many mouse clicks occured */
> > 
> > cause an illegal memory access (around 0x2000, sometimes 0x2010).
> 
> You're missing a parameter (hicount).

This is why I prefer evnt_multi_fast(). Only 3 parameters ;-) I do wonder why 
the compiler didn't issue a warning, though.

Cheers,
JFL
-- 
Jean-François Lemaire