From dd6a441312b957fc470017a3e343acf9341d037e Mon Sep 17 00:00:00 2001 From: Cary R Date: Mon, 6 Aug 2007 19:28:54 -0700 Subject: [PATCH] [PATCH] Fixed the display of real values with the %t format. Add a calculation to compute the required width for real values when displayed with the %t formet. --- vpi/sys_display.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/vpi/sys_display.c b/vpi/sys_display.c index 134554d77..18753f21f 100644 --- a/vpi/sys_display.c +++ b/vpi/sys_display.c @@ -309,8 +309,9 @@ static void format_time_real(unsigned mcd, int fsize, /* The timeformat_info.prec is the number of digits after the decimal point, no matter what the units. */ - my_mcd_printf(mcd, "%0.*f%s", timeformat_info.prec, value, - timeformat_info.suff); + my_mcd_printf(mcd, "%*.*f%s", timeformat_info.width - + strlen(timeformat_info.suff), timeformat_info.prec, + value, timeformat_info.suff); }