mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-23 12:52:46 +00:00
[vulkan] Correct the usage of custom field offsets
I had missed the array declaration and thus initialized the pointer to the offset array incorrectly. Didn't show up until I tried using multiple offsets.
This commit is contained in:
parent
2430f44d7b
commit
5c0ce2c414
1 changed files with 2 additions and 2 deletions
|
@ -23,7 +23,7 @@
|
|||
|
||||
-writeParseData
|
||||
{
|
||||
fprintf (output_file, "static size_t parse_%s_%s_offsets = {\n",
|
||||
fprintf (output_file, "static size_t parse_%s_%s_offsets[] = {\n",
|
||||
struct_name, field_name);
|
||||
for (int i = 0, count = [fields count]; i < count; i++) {
|
||||
string field = [[fields getObjectAtIndex:i] string];
|
||||
|
@ -35,7 +35,7 @@
|
|||
fprintf (output_file, "static parse_custom_t parse_%s_%s_data = {\n",
|
||||
struct_name, field_name);
|
||||
fprintf (output_file, "\t%s,\n", parser);
|
||||
fprintf (output_file, "\t&parse_%s_%s_offsets,\n",
|
||||
fprintf (output_file, "\tparse_%s_%s_offsets,\n",
|
||||
struct_name, field_name);
|
||||
fprintf (output_file, "\t%d,\n", [fields count]);
|
||||
fprintf (output_file, "};\n");
|
||||
|
|
Loading…
Reference in a new issue