diff --git a/vpi/sys_scanf.c b/vpi/sys_scanf.c index f494841e6..0666536f6 100644 --- a/vpi/sys_scanf.c +++ b/vpi/sys_scanf.c @@ -28,6 +28,7 @@ # include # include # include +# include # include # include "ivl_alloc.h" @@ -803,7 +804,7 @@ static int scan_format(vpiHandle callh, struct byte_source*src, vpiHandle argv, * parse it generically first. */ unsigned suppress_flag = 0; - unsigned max_width = -1; + unsigned max_width = UINT_MAX; int code = 0; /* Look for the suppression character '*'. */