From c5e17d2436bc95927abb6b04f0517a2a44772f4b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kristian=20Set=C3=A4l=C3=A4?= Date: Tue, 4 Aug 2015 10:14:31 +0300 Subject: [PATCH] fix #2 --- wrapper.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wrapper.cpp b/wrapper.cpp index 93fc636..05dfd38 100644 --- a/wrapper.cpp +++ b/wrapper.cpp @@ -59,7 +59,7 @@ bool print_status(XKeyboard& xkb, string format) { stringstream r; // resulting string for (size_t i = 0; i < format.length(); ++i) { - if (i < format.length()-2 && format[i] == '%') { + if (i < format.length()-1 && format[i] == '%') { switch (format[i+1]) { case 'c': r << xkb.currentGroupNum();