In the function TOvcUndoBuffer.NthRec, the cast to 'Cardinal' must be replaced by 'NativeUInt':
function TOvcUndoBuffer.NthRec(N : Integer) : PUndoRec; register;
...
begin
result := PUndoRec(self.Buffer);
while N>1 do begin
result := PUndoRec(Cardinal(result) + UndoRecSize + result^.DSize*SizeOf(Char));
Dec(N);
end;
end;
In the function TOvcUndoBuffer.NthRec, the cast to 'Cardinal' must be replaced by 'NativeUInt':
function TOvcUndoBuffer.NthRec(N : Integer) : PUndoRec; register; ... begin result := PUndoRec(self.Buffer); while N>1 do begin result := PUndoRec(Cardinal(result) + UndoRecSize + result^.DSize*SizeOf(Char)); Dec(N); end; end;