From: Miroslav Lichvar Date: Mon, 2 Aug 2010 09:33:01 +0000 (+0200) Subject: fix percentage parsing in --gauge XXX block (#620083) X-Git-Tag: r0-52-12~4 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=44e7bee70ab55c24d9805a527e40c1564b45dded;p=thirdparty%2Fnewt.git fix percentage parsing in --gauge XXX block (#620083) --- diff --git a/dialogboxes.c b/dialogboxes.c index 4d298a0..515c5be 100644 --- a/dialogboxes.c +++ b/dialogboxes.c @@ -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);