util/lookup*.c: fix integer pointer arithmetic not using pointertype

This would be a bug on WIN64 and other LLP64 models.
This commit is contained in:
Darryl L. Miles 2024-10-10 20:23:52 +01:00 committed by Tim Edwards
parent f22ecda44a
commit fd5050b2b5
2 changed files with 2 additions and 2 deletions

View File

@ -219,7 +219,7 @@ LookupStruct(str, table_start, size)
}
}
pos++;
entry = (const char **)((long)entry + (long) size);
entry = (const char **)((pointertype)entry + (pointertype)size);
}
return(match);
}

View File

@ -123,7 +123,7 @@ LookupStructFull(str, table, size)
if( strcmp(str, *entry) == 0 ) {
return pos;
}
entry = (const char * const *)((long)entry + (long)size);
entry = (const char * const *)((pointertype)entry + (pointertype)size);
}
return -1;