From 2e19908ac6cfc303d77d642a47994047247a0995 Mon Sep 17 00:00:00 2001 From: Louis Caron Date: Mon, 20 May 2024 16:17:22 +0200 Subject: [PATCH] remove overriding the bitmask when not found in dwarf --- src/update/mod.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/update/mod.rs b/src/update/mod.rs index 026b3e5..26bc499 100644 --- a/src/update/mod.rs +++ b/src/update/mod.rs @@ -296,7 +296,11 @@ pub(crate) fn set_bitmask(opt_bitmask: &mut Option, typeinfo: &TypeInfo *opt_bitmask = Some(bm); } } else { - *opt_bitmask = None; + // if there was a bitmask already configured, it is probably an unexplicit bitfield (a bit + // mask is configured in the a2l, but in the code, it is an integer with hardcoded shift and + // mask), so we should not remove the bitmask from the a2l otherwise the configuration will + // be lost + //*opt_bitmask = None; } }