From c4ca95bd619ed80a7b376331bcfa7bc1d80e73ee Mon Sep 17 00:00:00 2001 From: Nicolas Kruse Date: Sun, 12 Oct 2025 23:22:52 +0200 Subject: [PATCH] fix --- src/copapy/stencil_db.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/copapy/stencil_db.py b/src/copapy/stencil_db.py index 46c3abd..e93fd31 100644 --- a/src/copapy/stencil_db.py +++ b/src/copapy/stencil_db.py @@ -163,10 +163,12 @@ class stencil_database(): """Returns machine code for a specified function name""" func = self.elf.symbols[name] assert func.info == 'STT_FUNC', f"{name} is not a function" - index = get_last_call_in_function(func) + if part == 'start': + index = get_last_call_in_function(func) return func.data[:index] elif part == 'end': + index = get_last_call_in_function(func) return func.data[index + LENGTH_CALL_INSTRUCTION:] else: return func.data \ No newline at end of file