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:
parent
f22ecda44a
commit
fd5050b2b5
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in New Issue