diff --git a/cpukit/ChangeLog b/cpukit/ChangeLog index c397bd6280..63cd66e8e5 100644 --- a/cpukit/ChangeLog +++ b/cpukit/ChangeLog @@ -1,3 +1,9 @@ +2005-08-12 Chris Johns + + PR 808/rtems_misc + * libcsupport/src/printk.c: Fix bug where specifying field width + crashed on pc386 BSP. + 2005-08-06 Ralf Corsepius * libnetworking/nfs/bootp_subr.c: Don't include 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)])]);