Apply same changes as for tstruth2bu.pp to reflect change on HexToBin that checks Length of TBytes parameters

This commit is contained in:
Pierre Muller 2025-05-22 07:39:56 +00:00
parent d659ca7427
commit abd14e713b

View File

@ -175,7 +175,7 @@ begin
FillChar(BinValueBytes[0], Length(BinValueBytes), 0);
BinBufLen := Length(BinValueBytes);
ret := HexToBin(HexValueBytes, 2, BinValueBytes, 2, BinBufLen);
if ret <> 2 then halt(14);
if ret <> BinBufLen - 2 then halt(14);
if BinValueBytes[0] <> 0 then halt(14);
if BinValueBytes[1] <> 0 then halt(14);
if BinValueBytes[2] <> 236 then halt(14);
@ -188,7 +188,7 @@ begin
FillChar(BinValueBytes[0], Length(BinValueBytes), 0);
BinBufLen := Length(BinValueBytes);
ret := HexToBin(PChar(HexInputW), 2, BinValueBytes, 2, BinBufLen);
if ret <> 2 then halt(15);
if ret <> BinBufLen - 2 then halt(15);
if BinValueBytes[0] <> 0 then halt(15);
if BinValueBytes[1] <> 0 then halt(15);
if BinValueBytes[2] <> 236 then halt(15);
@ -198,7 +198,7 @@ begin
FillChar(BinValueBytes[0], Length(BinValueBytes), 0);
BinBufLen := Length(BinValueBytes);
ret := HexToBin(HexValueBytes, 2, BinValueBytes, 2, BinBufLen);
if ret <> 2 then halt(16);
if ret <> BinBufLen - 2 then halt(16);
if BinValueBytes[0] <> 0 then halt(16);
if BinValueBytes[1] <> 0 then halt(16);
if BinValueBytes[2] <> 236 then halt(16);