diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2005-08-12 23:56:16 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2005-08-12 23:56:16 +0000 |
commit | c949d6b0d345e079463f58f721ca14ac68620e7d (patch) | |
tree | 706f02aeea4c4b9ca7d86920858d357854ce6adc /cpukit/libcsupport | |
parent | 2005-08-12 Phil Torre <ptorre@zetron.com> (diff) | |
download | rtems-c949d6b0d345e079463f58f721ca14ac68620e7d.tar.bz2 |
2005-08-12 Chris Johns <chrisj@rtems.org>
PR 808/rtems_misc
* libcsupport/src/printk.c: Fix bug where specifying field width
crashed on pc386 BSP.
Diffstat (limited to '')
-rw-r--r-- | cpukit/libcsupport/src/printk.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/cpukit/libcsupport/src/printk.c b/cpukit/libcsupport/src/printk.c index 2db31f0bd9..4ce64153b9 100644 --- a/cpukit/libcsupport/src/printk.c +++ b/cpukit/libcsupport/src/printk.c @@ -53,10 +53,8 @@ printNum(long unsigned int num, int base, int sign, int maxwidth, int lead) } toPrint[count++] = num; - if (maxwidth) { - for (n=maxwidth-count ; n ; n-- ) - BSP_output_char(lead); - } + for (n=maxwidth ; n > count; n-- ) + BSP_output_char(lead); for (n = 0; n < count; n++){ BSP_output_char("0123456789ABCDEF"[(int)(toPrint[count-(n+1)])]); |