mirror of
https://github.com/revng/revng
synced 2026-06-21 14:07:57 +00:00
model override-by-name: skip nameless base functions
`base_function["Name"]` crashes with `KeyError` when the model has a function without an explicit `Name` (e.g. the binary entry stub). Skip those entries silently; only named functions can be matched by name anyway.
This commit is contained in:
@@ -87,6 +87,8 @@ class ModelOverrideByName(Command):
|
||||
return 1
|
||||
|
||||
for base_function in base_model["Functions"]:
|
||||
if "Name" not in base_function:
|
||||
continue
|
||||
if base_function["Name"] == function_name:
|
||||
function_to_override["Entry"] = base_function["Entry"]
|
||||
function_to_override["Name"] = base_function["Name"]
|
||||
|
||||
Reference in New Issue
Block a user