소스 검색

* fixes array overflow in VarTypeAsText when an 'Array of' or 'Ref to' variant type is passed

git-svn-id: trunk@11842 -
florian 17 년 전
부모
커밋
340844b9e0
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      rtl/inc/variants.pp

+ 1 - 1
rtl/inc/variants.pp

@@ -4082,7 +4082,7 @@ function VarTypeAsText(const AType: TVarType): string;
     'Unknown','Decimal','???','ShortInt','Byte','Word','DWord','Int64','QWord');
   begin
     if ((AType and varTypeMask)>=low(names)) and ((AType and varTypeMask)<=high(names)) then
-      Result:=names[AType]
+      Result:=names[AType and varTypeMask]
     else
       case AType and varTypeMask of
         varString: