Proper upper limit for mousechar start is UCHAR_MAX - 3, not UCHAR_MAX
PR: 24437 Submitted by: Cejka Rudolf <cejkar@dcse.fee.vutbr.cz>
This commit is contained in:
parent
54263d2af4
commit
60fe15c90d
@ -488,8 +488,8 @@ set_mouse_char(char *arg)
|
||||
long l;
|
||||
|
||||
l = strtol(arg, NULL, 0);
|
||||
if ((l < 0) || (l > UCHAR_MAX)) {
|
||||
warnx("argument to -M must be 0 through %d", UCHAR_MAX);
|
||||
if ((l < 0) || (l > UCHAR_MAX - 3)) {
|
||||
warnx("argument to -M must be 0 through %d", UCHAR_MAX - 3);
|
||||
return;
|
||||
}
|
||||
mouse.operation = MOUSE_MOUSECHAR;
|
||||
|
Loading…
Reference in New Issue
Block a user