]> git.sur5r.net Git - i3/i3lock/commitdiff
Limit the debug print to the actual password size
authorQuentin Glidic <sardemff7+git@sardemff7.net>
Thu, 7 Feb 2013 16:14:53 +0000 (17:14 +0100)
committerMichael Stapelberg <michael@stapelberg.de>
Thu, 7 Feb 2013 16:15:16 +0000 (17:15 +0100)
Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net>
i3lock.c

index 69f191eb70f6e95ee26df0046df1af3c3e683523..df07d903e65264fdb116b9fdf0a8688d82797bc2 100644 (file)
--- a/i3lock.c
+++ b/i3lock.c
@@ -305,7 +305,7 @@ static void handle_key_press(xcb_key_press_event_t *event) {
     /* store it in the password array as UTF-8 */
     memcpy(password+input_position, buffer, n-1);
     input_position += n-1;
-    DEBUG("current password = %s\n", password);
+    DEBUG("current password = %.*s\n", input_position, password);
 
     unlock_state = STATE_KEY_ACTIVE;
     redraw_screen();