When resizing the stack, fix the pointers properly.
git-svn-id: http://code.remobjects.com/svn/pascalscript@102 5c9d2617-0215-0410-a2ee-e80e04d1c6d8
This commit is contained in:
parent
7d88cae7a6
commit
6e0b9d7299
@ -11737,8 +11737,15 @@ begin
|
||||
OOFS := FLength;
|
||||
Move(FDataPtr^, p^, OOFS);
|
||||
OOFS := IPointer(P) - IPointer(FDataPtr);
|
||||
for i := Count -1 downto 0 do
|
||||
|
||||
for i := Count -1 downto 0 do begin
|
||||
Data[i] := Pointer(IPointer(Data[i]) + OOFS);
|
||||
if Items[i].FType.FBaseType = btPointer then begin // check if pointer points to moved stack data
|
||||
if (IPointer(PPSVariantPointer(Data[i]).DataDest) >= IPointer(FDataPtr)) and
|
||||
(IPointer(PPSVariantPointer(Data[i]).DataDest) < IPointer(FDataPtr)+IPointer(FLength)) then
|
||||
PPSVariantPointer(Data[i]).DataDest := Pointer(IPointer(PPSVariantPointer(Data[i]).DataDest) + OOFS);
|
||||
end;
|
||||
end;
|
||||
|
||||
FreeMem(FDataPtr, FCapacity);
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user