Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#7 Bug when mouse moves!

open
nobody
None
5
2007-05-29
2007-05-29
Smaug_
No

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.

Discussion

  • Smaug_
    Smaug_
    2007-05-30

    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.