Update size check in $fread()

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

View File

@ -652,7 +652,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));