vkd3d: Properly compare integers in compare_descriptor_range().

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Henri Verbeet 2022-03-01 13:21:27 +01:00 committed by Alexandre Julliard
parent 41b445d965
commit 8844118d1b

View File

@ -835,10 +835,10 @@ static int compare_descriptor_range(const void *a, const void *b)
const struct d3d12_root_descriptor_table_range *range_a = a, *range_b = b; const struct d3d12_root_descriptor_table_range *range_a = a, *range_b = b;
int ret; int ret;
if ((ret = range_a->type - range_b->type)) if ((ret = vkd3d_u32_compare(range_a->type, range_b->type)))
return ret; return ret;
if ((ret = range_a->offset - range_b->offset)) if ((ret = vkd3d_u32_compare(range_a->offset, range_b->offset)))
return ret; return ret;
return (range_a->descriptor_count == UINT_MAX) - (range_b->descriptor_count == UINT_MAX); return (range_a->descriptor_count == UINT_MAX) - (range_b->descriptor_count == UINT_MAX);