mirror of
https://github.com/tiyn/slock.git
synced 2026-02-22 07:14:48 +01:00
added control-clear patch to master
This commit is contained in:
5
slock.c
5
slock.c
@@ -216,8 +216,9 @@ readpw(Display *dpy, struct xrandr *rr, struct lock **locks, int nscreens,
|
||||
passwd[--len] = '\0';
|
||||
break;
|
||||
default:
|
||||
if (num && !iscntrl((int)buf[0]) &&
|
||||
(len + num < sizeof(passwd))) {
|
||||
if (controlkeyclear && iscntrl((int)buf[0]))
|
||||
continue;
|
||||
if (num && (len + num < sizeof(passwd))) {
|
||||
memcpy(passwd + len, buf, num);
|
||||
len += num;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user