mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-21 13:09:32 +02:00
* Do not test variants with equal memory area: e.g. strings may point to different memory areas
This commit is contained in:
parent
b6a87450eb
commit
85524ff821
@ -241,15 +241,15 @@ begin
|
||||
{$ifdef fpc}
|
||||
tkObject,
|
||||
{$endif}
|
||||
tkMethod,
|
||||
tkVariant: begin
|
||||
tkMethod:
|
||||
begin
|
||||
if aValue1.DataSize = aValue2.DataSize then
|
||||
Result := CompareMem(aValue1.GetReferenceToRawData, aValue2.GetReferenceToRawData, aValue1.DataSize)
|
||||
else
|
||||
Result := False;
|
||||
end
|
||||
else
|
||||
Result := False;
|
||||
end;
|
||||
tkVariant:
|
||||
Result := aValue1.AsVariant = aValue2.AsVariant;
|
||||
end;
|
||||
end else
|
||||
Result := False;
|
||||
|
Loading…
Reference in New Issue
Block a user