Signed-off-by: Jean Privat <jean@pryen.org>
end
v.add_decl("\},")
else
end
v.add_decl("\},")
else
- v.add_decl("0, \{\}, /*DEAD TYPE*/")
+ # Use -1 to indicate dead type, the info is used by --hardening
+ v.add_decl("-1, \{\}, /*DEAD TYPE*/")
end
v.add_decl("\};")
end
end
v.add_decl("\};")
end
v.add("if({t} == NULL) \{")
v.add_abort("type null")
v.add("\}")
v.add("if({t} == NULL) \{")
v.add_abort("type null")
v.add("\}")
- v.add("if({t}->table_size == 0) \{")
+ v.add("if({t}->table_size < 0) \{")
v.add("PRINT_ERROR(\"Insantiation of a dead type: %s\\n\", {t}->name);")
v.add_abort("type dead")
v.add("\}")
v.add("PRINT_ERROR(\"Insantiation of a dead type: %s\\n\", {t}->name);")
v.add_abort("type dead")
v.add("\}")