소스 검색

RegisterCustomVariantType: initialize the customvariant array to the correct length before assigning new value

git-svn-id: trunk@36343 -
Marc Weustink 8 년 전
부모
커밋
2b2200fcc6
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      packages/rtl-objpas/src/inc/variants.pp

+ 1 - 1
packages/rtl-objpas/src/inc/variants.pp

@@ -3897,7 +3897,7 @@ begin
 
     index:=RequestedVarType-CMinVarType;
     if index>=L then
-      SetLength(customvarianttypes,L+1);
+      SetLength(customvarianttypes,index+1);
     if Assigned(customvarianttypes[index]) then
     begin
       if customvarianttypes[index]=InvalidCustomVariantType then