From a59aceda751bd1594b91c632fe0ae85b844707df Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Fri, 26 Apr 2024 14:36:02 +0200 Subject: [PATCH] odd things happening here --- eive_tmtc/tmtc/payload/ploc_mpsoc.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/eive_tmtc/tmtc/payload/ploc_mpsoc.py b/eive_tmtc/tmtc/payload/ploc_mpsoc.py index 68dc9c3..2a93ef7 100644 --- a/eive_tmtc/tmtc/payload/ploc_mpsoc.py +++ b/eive_tmtc/tmtc/payload/ploc_mpsoc.py @@ -745,7 +745,8 @@ def handle_mpsoc_data_reply(action_id: int, pw: PrintWrapper, custom_data: bytea "PLOC MPSoC flash directory data shorter than minimum 16 bytes" ) current_idx = 0 - dir_name_short = custom_data[current_idx : current_idx + 12].decode() + end_of_str = custom_data[current_idx : current_idx + 12].index(b"\x00") + dir_name_short = custom_data[current_idx : current_idx + end_of_str].decode() current_idx += 12 num_elements = struct.unpack("!I", custom_data[current_idx : current_idx + 4])[ 0