Check that $timeformat is not given more than four arguments.

Add a check that $timeformat is not given more than four arguments.
This commit is contained in:
Cary R 2007-08-13 16:18:24 -07:00 committed by Stephen Williams
parent 1942899a3f
commit 632685d830
1 changed files with 7 additions and 1 deletions

View File

@ -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;