mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-04-08 10:21:40 +00:00
[qfcc] Fix a complete brainfart with strcmp
Doing <= when I wanted != caused some very strange behavior with valgrind and bsearch. Also, going with negative logic rather than positive logic is probably the cause of the brainfart.
This commit is contained in:
parent
809cffa3a8
commit
622be33e4b
1 changed files with 2 additions and 2 deletions
|
@ -506,8 +506,8 @@ spirv_intrinsic_symbol (const char *name, symtab_t *symtab)
|
|||
kind = bsearch (&(spirv_kind_t) { .kind = name },
|
||||
grammar->operand_kinds, grammar->num_operand_kinds,
|
||||
sizeof (spirv_kind_t), spirv_kind_cmp);
|
||||
if (kind && strcmp (kind->category, "Composite") != 0
|
||||
&& strcmp (kind->category, "Literal") != 1) {
|
||||
if (kind && (strcmp (kind->category, "BitEnum") == 0
|
||||
|| strcmp (kind->category, "ValueEnum") == 0)) {
|
||||
if (!kind->symtab) {
|
||||
kind->symtab = new_symtab (nullptr, stab_enum);
|
||||
kind->symtab->procsymbol = spirv_kind_symbol;
|
||||
|
|
Loading…
Reference in a new issue