Explorar o código

* Fixed undefined return value of SysGetData function. Also don't ignore the input BufSize parameter but pass it on to GetValueData. Bug #19962.

git-svn-id: trunk@18178 -
sergei %!s(int64=14) %!d(string=hai) anos
pai
achega
b8c6c7c893
Modificáronse 1 ficheiros con 2 adicións e 3 borrados
  1. 2 3
      packages/fcl-registry/src/xregreg.inc

+ 2 - 3
packages/fcl-registry/src/xregreg.inc

@@ -47,10 +47,9 @@ function TRegistry.SysGetData(const Name: String; Buffer: Pointer;
 
 Var
   DataType : TDataType;
-  BS : Integer;
-
 begin
-  If TXmlregistry(FSysData).GetValueData(Name,DataType,Buffer^,BS) then
+  Result:=BufSize;
+  If TXmlregistry(FSysData).GetValueData(Name,DataType,Buffer^,Result) then
     begin
     Case DataType of
       dtUnknown : RegData:=rdUnknown;