diff --git a/libs/vkd3d-shader/spirv.c b/libs/vkd3d-shader/spirv.c index cc8748d9a6d25f3ad271d830614b2b72e8e2a3fd..0e3dbf08c35bcd6833c047204972fdd17caca38f 100644 --- a/libs/vkd3d-shader/spirv.c +++ b/libs/vkd3d-shader/spirv.c @@ -2046,9 +2046,10 @@ static int vkd3d_symbol_compare(const void *key, const struct rb_entry *entry) { const struct vkd3d_symbol *a = key; const struct vkd3d_symbol *b = RB_ENTRY_VALUE(entry, const struct vkd3d_symbol, entry); + int ret; - if (a->type != b->type) - return a->type - b->type; + if ((ret = vkd3d_u32_compare(a->type, b->type))) + return ret; return memcmp(&a->key, &b->key, sizeof(a->key)); }