-
Notifications
You must be signed in to change notification settings - Fork 13
Open
Description
In UPhysics.pas there are two pointer arithmetic problems
with 64 bit compilers. The code is typecasting a pointer as an Integer.
A pointer is really a NativeUInt.
// PInt32( Integer(m_stack) + SizeOf(Int32) * m_count)^ := element; //wrong
// Integer(m_stack) truncates m_stack pointer, causing invalid access.
PInt32( NativeUInt(m_stack) + SizeOf(Int32) * m_count)^ := element; //correct
and also
//Result := PInt32(Integer(m_stack) + SizeOf(Int32) * m_count)^;
Result := PInt32(NativeUInt(m_stack) + SizeOf(Int32) * m_count)^;
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels