Skip to content

Commit 06993b0

Browse files
committed
CHB: add -1 to terminate callback table
1 parent 44b0fa8 commit 06993b0

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

CodeHawk/CHB/bchlibelf/bCHELFHeader.ml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -571,6 +571,8 @@ object(self)
571571
let cbv =
572572
if pv#equal wordzero then
573573
CBValue numerical_zero
574+
else if pv#equal wordnegone then
575+
CBValue (mkNumerical (-1))
574576
else
575577
match s with
576578
| "address" -> CBAddress pv#to_hex_string
@@ -583,7 +585,7 @@ object(self)
583585
cbvalues := ((i * 4), cbv) :: !cbvalues) fieldkinds;
584586
(if List.for_all (fun (_, v) ->
585587
match v with
586-
| CBValue n -> n#equal numerical_zero
588+
| CBValue n -> n#equal numerical_zero || n#equal (mkNumerical (-1))
587589
| _ -> false) !cbvalues then
588590
nullrecord := true
589591
else

0 commit comments

Comments
 (0)