summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libc
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2001-10-10 18:42:07 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2001-10-10 18:42:07 +0000
commitceead58b56772fcade893a8eb1e01e7ce2e9e32c (patch)
tree5a26f53cd9cd42e584aedab99a2496f378244d6c /c/src/lib/libc
parent2001-10-09 Ralf Corsepius <corsepiu@faw.uni-ulm.de> (diff)
downloadrtems-ceead58b56772fcade893a8eb1e01e7ce2e9e32c.tar.bz2
2001-10-10 Joel Sherrill <joel@OARcorp.com>
* libc/printk.c (printNum): Properly handle a maxwidth of 0 as reported by Nick Hennenfent <NICK.HENNENFENT@ROCHE.COM>.
Diffstat (limited to 'c/src/lib/libc')
-rw-r--r--c/src/lib/libc/printk.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/c/src/lib/libc/printk.c b/c/src/lib/libc/printk.c
index 20178224db..2d833db4e3 100644
--- a/c/src/lib/libc/printk.c
+++ b/c/src/lib/libc/printk.c
@@ -44,7 +44,7 @@ printNum(long unsigned int num, int base, int sign, int maxwidth, int lead)
if ( (sign == 1) && ((long)num < 0) ) {
BSP_output_char('-');
num = -num;
- maxwidth--;
+ if (maxwidth) maxwidth--;
}
count = 0;