mirror of
https://github.com/WerWolv/ImHex-Patterns.git
synced 2026-03-27 23:37:04 -05:00
includes/type: Fix parsing of signed leb128 (#333)
This commit is contained in:
committed by
GitHub
parent
2db9993cb1
commit
883433b260
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user