Skip to content

Commit 075b061

Browse files
committed
CHB: generalize offset handling
1 parent 83ee461 commit 075b061

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

CodeHawk/CHB/bchlib/bCHFloc.ml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1682,10 +1682,9 @@ object (self)
16821682
"symoff: " ^ (memory_offset_to_string symoff)])
16831683
symoff_r
16841684

1685-
| ConstantOffset (n, NoOffset) when is_pointer basevartype
1686-
&& n#equal numerical_zero ->
1685+
| ConstantOffset (n, NoOffset) when is_pointer basevartype ->
16871686
let symoff_r =
1688-
address_memory_offset (ptr_deref basevartype) zero_constant_expr in
1687+
address_memory_offset (ptr_deref basevartype) (num_constant_expr n) in
16891688
TR.tbind (fun symoff ->
16901689
match symoff with
16911690
| FieldOffset ((fname, ckey), NoOffset) ->
@@ -1697,6 +1696,7 @@ object (self)
16971696
(p2s self#l#toPretty);
16981697
"get_basevar_type: address_memory_offset";
16991698
"basevar: " ^ (p2s basevar#toPretty);
1699+
"offset: " ^ (memory_offset_to_string offset);
17001700
"basevartype: " ^ (btype_to_string basevartype);
17011701
"symoff: " ^ (memory_offset_to_string symoff)])
17021702
symoff_r

CodeHawk/CHB/bchlib/bCHVersion.ml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,8 @@ end
9595

9696

9797
let version = new version_info_t
98-
~version:"0.6.0_20260119"
99-
~date:"2026-01-19"
98+
~version:"0.6.0_20260122"
99+
~date:"2026-01-22"
100100
~licensee: None
101101
~maxfilesize: None
102102
()

0 commit comments

Comments
 (0)