From ceead58b56772fcade893a8eb1e01e7ce2e9e32c Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Wed, 10 Oct 2001 18:42:07 +0000 Subject: 2001-10-10 Joel Sherrill * libc/printk.c (printNum): Properly handle a maxwidth of 0 as reported by Nick Hennenfent . --- cpukit/libcsupport/src/printk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cpukit/libcsupport/src') 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; -- cgit v1.2.3