From 632685d8309bf362a0e5055532f883fa2ad1115b Mon Sep 17 00:00:00 2001 From: Cary R Date: Mon, 13 Aug 2007 16:18:24 -0700 Subject: [PATCH] Check that $timeformat is not given more than four arguments. Add a check that $timeformat is not given more than four arguments. --- vpi/sys_display.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/vpi/sys_display.c b/vpi/sys_display.c index 6799f42db..8004fdcab 100644 --- a/vpi/sys_display.c +++ b/vpi/sys_display.c @@ -1244,7 +1244,13 @@ static PLI_INT32 sys_timeformat_compiletf(PLI_BYTE8*xx) return 0; } } - vpi_free_object(argv); + tmp = vpi_scan(argv); + if (tmp != 0) { + vpi_printf("ERROR: $timeformat takes at most four" + " arguments.\n"); + vpi_control(vpiFinish, 1); + return 0; + } } return 0;