1
0
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:
2023-10-26 02:40:44 +02:00
3 changed files with 33 additions and 2 deletions

View File

@@ -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;
}