diff options
Diffstat (limited to 'script/plugins')
-rw-r--r-- | script/plugins/ffi/c-parser/ctypes.lua | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/script/plugins/ffi/c-parser/ctypes.lua b/script/plugins/ffi/c-parser/ctypes.lua index 81d0ccf6..115f78ab 100644 --- a/script/plugins/ffi/c-parser/ctypes.lua +++ b/script/plugins/ffi/c-parser/ctypes.lua @@ -149,7 +149,10 @@ end local function add_to_fields(lst, field_src, fields) if type(field_src) == "table" and not field_src.ids then assert(field_src.type.type == "union") - local subfields = get_fields(lst, field_src.type.fields) + local subfields, err = get_fields(lst, field_src.type.fields) + if not subfields then + return nil, err + end for _, subfield in ipairs(subfields) do table.insert(fields, subfield) end |