Skip to content

Commit

Permalink
includes/type: Fix parsing of signed leb128 (#333)
Browse files Browse the repository at this point in the history
  • Loading branch information
hexagonrecursion authored Dec 18, 2024
1 parent 2db9993 commit 883433b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion includes/type/leb128.pat
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ namespace auto type {

fn transform_sleb128_array(ref auto array) {
s128 res = type::impl::transform_uleb128_array(array);
if (res & 0x40 != 0) {
if (res & 1 << ((sizeof(array) / sizeof(u8)) * 7 - 1) != 0) {
res |= ~0 << (sizeof(array) / sizeof(u8)) * 7;
}
return res;
Expand Down

0 comments on commit 883433b

Please sign in to comment.