mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-14 03:19:27 +02:00
* correctly handle DataSize for ShortString
git-svn-id: trunk@36988 -
This commit is contained in:
parent
c74afe6824
commit
9dff6043d9
@ -614,7 +614,7 @@ function TValue.GetDataSize: SizeInt;
|
||||
begin
|
||||
if IsEmpty then
|
||||
Result := 0
|
||||
else if Assigned(FData.FValueData) then
|
||||
else if Assigned(FData.FValueData) and (Kind <> tkSString) then
|
||||
Result := FData.FValueData.GetDataSize
|
||||
else begin
|
||||
Result := 0;
|
||||
@ -660,7 +660,8 @@ begin
|
||||
{ ? }
|
||||
Result := SizeOf(TMethod);
|
||||
tkSString:
|
||||
Result := SizeOf(ShortString);
|
||||
{ ShortString can hold max. 254 characters as [0] is Length and [255] is #0 }
|
||||
Result := SizeOf(ShortString) - 2;
|
||||
tkVariant:
|
||||
Result := SizeOf(Variant);
|
||||
tkProcVar:
|
||||
|
Loading…
Reference in New Issue
Block a user