From 3ea72109f8a9813df620aa1ec3cfb8e02ba48928 Mon Sep 17 00:00:00 2001 From: Stephen Williams Date: Mon, 21 Jan 2008 18:11:28 -0800 Subject: [PATCH] Read and include sign of scanned decimal. Fix simple bug where negative values read from the source file were not getting their sign. The fix was proposed in pr1876738. --- vpi/sys_scanf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vpi/sys_scanf.c b/vpi/sys_scanf.c index 66126d193..c0dd3bd8f 100644 --- a/vpi/sys_scanf.c +++ b/vpi/sys_scanf.c @@ -398,7 +398,7 @@ static int scan_format(vpiHandle sys, struct byte_source*src, vpiHandle argv) assert(item); val.format = vpiIntVal; - val.value.integer = value; + val.value.integer = value * sign_flag; vpi_put_value(item, &val, 0, vpiNoDelay); rc += 1; break;