mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-30 11:20:23 +02:00
* fixes array overflow in VarTypeAsText when an 'Array of' or 'Ref to' variant type is passed
git-svn-id: trunk@11842 -
This commit is contained in:
parent
64cabb39d8
commit
340844b9e0
@ -4082,7 +4082,7 @@ function VarTypeAsText(const AType: TVarType): string;
|
|||||||
'Unknown','Decimal','???','ShortInt','Byte','Word','DWord','Int64','QWord');
|
'Unknown','Decimal','???','ShortInt','Byte','Word','DWord','Int64','QWord');
|
||||||
begin
|
begin
|
||||||
if ((AType and varTypeMask)>=low(names)) and ((AType and varTypeMask)<=high(names)) then
|
if ((AType and varTypeMask)>=low(names)) and ((AType and varTypeMask)<=high(names)) then
|
||||||
Result:=names[AType]
|
Result:=names[AType and varTypeMask]
|
||||||
else
|
else
|
||||||
case AType and varTypeMask of
|
case AType and varTypeMask of
|
||||||
varString:
|
varString:
|
||||||
|
Loading…
Reference in New Issue
Block a user