Xinqi Bao's Git
projects
/
slock.git
/ blobdiff
summary
|
log
|
commit
|
diff
|
tree
raw
| inline |
side by side
Properly clear the last entered character
[slock.git]
/
slock.c
diff --git
a/slock.c
b/slock.c
index
d55eb3d
..
5ae738c
100644
(file)
--- a/
slock.c
+++ b/
slock.c
@@
-177,7
+177,7
@@
readpw(Display *dpy, struct xrandr *rr, struct lock **locks, int nscreens,
break;
case XK_BackSpace:
if (len)
- passwd[
len--
] = '\0';
+ passwd[
--len
] = '\0';
break;
default:
if (num && !iscntrl((int)buf[0]) &&