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:
jmg 2004-08-09 04:27:58 +00:00
parent 782b0fc9c2
commit 53007bef04

View File

@ -893,7 +893,7 @@ set_functionkey(char *keynumstr, char *string)
fkey.flen, MAXFK);
return;
}
strcpy(fkey.keydef, string);
strncpy(fkey.keydef, string, MAXFK);
fkey.keynum -= 1;
if (ioctl(0, SETFKEY, &fkey) < 0)
warn("setting function key");