]> git.ipfire.org Git - thirdparty/newt.git/commitdiff
fix percentage parsing in --gauge XXX block (#620083)
authorMiroslav Lichvar <mlichvar@redhat.com>
Mon, 2 Aug 2010 09:33:01 +0000 (11:33 +0200)
committerMiroslav Lichvar <mlichvar@redhat.com>
Mon, 2 Aug 2010 09:38:11 +0000 (11:38 +0200)
dialogboxes.c

index 4d298a06b89d7a53f40df207a20a4cd07b126029..515c5be69f48a6dee9e30065a5fa34c6cd73d8c5 100644 (file)
@@ -162,9 +162,13 @@ int gauge(const char * text, int height, int width, poptContext optCon, int fd,
            } while (!feof(f));
 
            newtTextboxSetText(tb, buf);
+
+           arg = buf3;
+       } else {
+           arg = buf;
        }
 
-       val = strtoul(buf, &end, 10);
+       val = strtoul(arg, &end, 10);
        if (*buf && !*end) {
            newtScaleSet(scale, val);
            newtDrawForm(form);