Update size check in $fread()

This commit is contained in:
Cary R 2020-07-03 23:12:06 -07:00
parent 6d8dea8d05
commit b8ae9a85fa
1 changed files with 1 additions and 1 deletions

View File

@ -639,7 +639,7 @@ static PLI_INT32 sys_fread_calltf(ICARUS_VPI_CONST PLI_BYTE8*name)
val.format = vpiIntVal;
vpi_get_value(arg, &val);
count = val.value.integer;
if (count > max-start) {
if (count > max-start+1) {
vpi_printf("WARNING: %s:%d: ",
vpi_get_str(vpiFile, callh),
(int)vpi_get(vpiLineNo, callh));