diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2010-01-24 18:16:29 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2010-01-24 18:16:29 -0800 |
commit | c7e42d7f1a4d7bea93090c826e7cf5de19c3061b (patch) | |
tree | a14ec65734e0fa9eb770b6ebf9b9431c7ceed5a0 /stream.c | |
parent | 64b09cd68e003f3f1c1b71284aceb90b9c236f05 (diff) | |
download | txr-c7e42d7f1a4d7bea93090c826e7cf5de19c3061b.tar.gz txr-c7e42d7f1a4d7bea93090c826e7cf5de19c3061b.tar.bz2 txr-c7e42d7f1a4d7bea93090c826e7cf5de19c3061b.zip |
* stream.c (vformat_num): Fix bad width calculation.
Diffstat (limited to 'stream.c')
-rw-r--r-- | stream.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -651,7 +651,7 @@ static val vformat_num(val stream, const char *str, int width, int left, int pad, int precision) { int len = strlen(str); - int truewidth = (width < precision) ? width : precision; + int truewidth = (width > precision) ? width : precision; int slack = (len < truewidth) ? truewidth - len : 0; int padlen = (len < precision) ? precision - len : 0; int i; |