mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-04-16 06:11:15 +00:00
[vkgen] Fix parsing of actual bool types
Switching to native ruamoko bool for vkgen resulted in bool getting incorrectly parsed as a string (which mean getting the string's address written to the value). Fixes the randomly enabled debug pipelines (and probably a few randomly disabled normal pipelines, though less likely as they're usually implicitly initialized). The one bit of actual legit UB (ie, that which wasn't immediately mitigated one way or another) found by ubsan, and it was a data error.
This commit is contained in:
parent
23e2fff44a
commit
5a928581ab
3 changed files with 13 additions and 2 deletions
|
@ -19,4 +19,15 @@
|
|||
{
|
||||
return "QFString";
|
||||
}
|
||||
|
||||
-(string) parseFunc
|
||||
{
|
||||
return "parse_enum";
|
||||
}
|
||||
|
||||
-(string) parseData
|
||||
{
|
||||
return "&cexpr_bool_enum";
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
|
@ -200,7 +200,7 @@ skip_value(string name)
|
|||
{
|
||||
fprintf (output_file, "\tHash_DelTable (%s_symtab.tab);\n",
|
||||
[self name]);
|
||||
fprintf (output_file, "\t%s_symtab.tab = 0;\n", [self name]);
|
||||
fprintf (output_file, "\t%s_symtab.tab = nullptr;\n", [self name]);
|
||||
}
|
||||
|
||||
-(void) writeSymtabEntry
|
||||
|
|
|
@ -532,7 +532,7 @@ write_table (Struct *self, PLItem *field_dict, Array *field_defs,
|
|||
|
||||
fprintf (output_file, "\tHash_DelTable (%s_symtab.tab);\n",
|
||||
[self outname]);
|
||||
fprintf (output_file, "\t%s_symtab.tab = 0;\n", [self outname]);
|
||||
fprintf (output_file, "\t%s_symtab.tab = nullptr;\n", [self outname]);
|
||||
}
|
||||
|
||||
-(void) writeSymtabEntry
|
||||
|
|
Loading…
Reference in a new issue