[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:
Bill Currie 2025-01-21 11:50:49 +09:00
parent 809cffa3a8
commit 622be33e4b

View file

@ -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;