From 1112e9f30137de9ae545fef8bda72a397d473f3e Mon Sep 17 00:00:00 2001 From: yury Date: Mon, 25 Jan 2021 15:44:55 +0000 Subject: [PATCH] * Fixed wrong buffers in the XML registry test. git-svn-id: trunk@48418 - --- packages/fcl-registry/tests/regtcxmlreg.pp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/fcl-registry/tests/regtcxmlreg.pp b/packages/fcl-registry/tests/regtcxmlreg.pp index 3e6501fd30..2de0ddb4fe 100644 --- a/packages/fcl-registry/tests/regtcxmlreg.pp +++ b/packages/fcl-registry/tests/regtcxmlreg.pp @@ -94,13 +94,13 @@ begin SetLength(S1,100); For I:=0 to 99 do S1[I]:=i; - XMLReg.SetValueData('b',dtBinary,S1[1],Length(S1)); + XMLReg.SetValueData('b',dtBinary,S1[0],Length(S1)); XMLReg.Flush; - DS:=SizeOf(S1) div 4; + DS:=Length(S1) div 4; SetLength(S2,DS); For I:=0 to DS-1 do S2[I]:=i; - AssertEquals('Cannot read, buffer size too small',False,XMLReg.GetValueData('b',dt,S2[1],ds)); + AssertEquals('Cannot read, buffer size too small',False,XMLReg.GetValueData('b',dt,S2[0],DS)); AssertTrue('Correct data type reported',dt=dtBinary); AssertEquals('Correct data buffer size reported',Length(S1),DS); end;