summaryrefslogtreecommitdiffstats
path: root/cpukit/libcsupport/src
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 /cpukit/libcsupport/src
parent083b72aecec001bd95b6ec5c7091bd3cc8b0af07 (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 '')
-rw-r--r--cpukit/libcsupport/src/printk.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/cpukit/libcsupport/src/printk.c b/cpukit/libcsupport/src/printk.c
index 20178224db..2d833db4e3 100644
--- a/cpukit/libcsupport/src/printk.c
+++ b/cpukit/libcsupport/src/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;