menu: fix input config for device names ending with space
authornotaz <notasas@gmail.com>
Thu, 7 Jan 2016 21:47:01 +0000 (23:47 +0200)
committernotaz <notasas@gmail.com>
Thu, 7 Jan 2016 21:51:43 +0000 (23:51 +0200)
reported by KP142EH12 and perhaps somebody else I forgot
also take the opportunity to update libpicofe

frontend/libpicofe
frontend/menu.c

index 26ea181..21604a0 160000 (submodule)
@@ -1 +1 @@
-Subproject commit 26ea18173c1228dd5ce39e2a88ffe1ae10fcb365
+Subproject commit 21604a047941b8fe81d381ede0371c75da964afd
index 0088a63..9ddbe37 100644 (file)
@@ -903,8 +903,6 @@ static void get_line(char *d, size_t size, const char *s)
                len = size - 1;
        strncpy(d, s, len);
        d[len] = 0;
-
-       mystrip(d);
 }
 
 static void keys_write_all(FILE *f)
@@ -1011,7 +1009,10 @@ static void keys_load_all(const char *cfg)
        while (p != NULL && (p = strstr(p, "binddev = ")) != NULL) {
                p += 10;
 
+               // don't strip 'dev' because there are weird devices
+               // with names with space at the end
                get_line(dev, sizeof(dev), p);
+
                dev_id = in_config_parse_dev(dev);
                if (dev_id < 0) {
                        printf("input: can't handle dev: %s\n", dev);