浏览代码

* always clear the variant part of FData

git-svn-id: trunk@36975 -
svenbarth 8 年之前
父节点
当前提交
6a95291eda
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      packages/rtl-objpas/src/inc/rtti.pp

+ 2 - 0
packages/rtl-objpas/src/inc/rtti.pp

@@ -546,6 +546,8 @@ type
   PQWordBool = ^QWordBool;
 begin
   result.FData.FTypeInfo:=ATypeInfo;
+  { resets the whole variant part; FValueData is already Nil }
+  Result.FData.FAsUInt64 := 0;
   case ATypeInfo^.Kind of
     tkSString  : result.FData.FValueData := TValueDataIntImpl.CreateCopy(ABuffer, Length(PShortString(ABuffer)^) + 1, ATypeInfo, True);
     tkWString,