mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-01-28 13:05:02 -08:00
vkd3d-shader/spirv: Properly compare integers in vkd3d_symbol_compare().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
7e08773d4e
commit
beb6b8efc7
@ -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 *a = key;
|
||||||
const struct vkd3d_symbol *b = RB_ENTRY_VALUE(entry, const struct vkd3d_symbol, entry);
|
const struct vkd3d_symbol *b = RB_ENTRY_VALUE(entry, const struct vkd3d_symbol, entry);
|
||||||
|
int ret;
|
||||||
|
|
||||||
if (a->type != b->type)
|
if ((ret = vkd3d_u32_compare(a->type, b->type)))
|
||||||
return a->type - b->type;
|
return ret;
|
||||||
return memcmp(&a->key, &b->key, sizeof(a->key));
|
return memcmp(&a->key, &b->key, sizeof(a->key));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user