fix bug which prevented programming function keys that were exactly 16
characters long.. strcpy was coping over the length... PR: 52960 Submitted by: Dmitry Sivachenko MFC after: 1 week
This commit is contained in:
parent
a740f6ee14
commit
37a0f3914b
@ -893,7 +893,7 @@ set_functionkey(char *keynumstr, char *string)
|
|||||||
fkey.flen, MAXFK);
|
fkey.flen, MAXFK);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
strcpy(fkey.keydef, string);
|
strncpy(fkey.keydef, string, MAXFK);
|
||||||
fkey.keynum -= 1;
|
fkey.keynum -= 1;
|
||||||
if (ioctl(0, SETFKEY, &fkey) < 0)
|
if (ioctl(0, SETFKEY, &fkey) < 0)
|
||||||
warn("setting function key");
|
warn("setting function key");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user