Bug when mouse moves!
Status: Beta
Brought to you by:
vl4d
I run the lkl perfectly, but when I move the mouse, lkl crash with a Segment violation error. I'm working in fix it. But I need some help.
-------------------------------------------------------
Ejecuto perfectamente el lkl, pero en el momento que muevo un poco el raton, lkl falla con una violacion de segmento. Estoy intengando solucionarlo, pero necesigo algo de ayuda.
Logged In: YES
user_id=1800733
Originator: YES
I found the error. The Line 58
-----------------------------------------------------
56 if(status == 20) {
57 c = inb(lkl->port);
58 if ((c < TABLE_SIZE) && (c!=0)){ // <-- here is the fix
59 if(table[c] != 1){
60 if((c == 42) // LShift
61 || (c == 54)) // RShift
62 lkl->pressed_shift = 1;
-------------------------------------------------------------------
When the mouse moves, inb function return a 0, I supposed 0 is out of range in table array and do a segment violation. I added the c!=0 to condition in line 58 and now run ok.