From 8844118d1bf82c18078aaa89c0a86ffa1aec8b67 Mon Sep 17 00:00:00 2001 From: Henri Verbeet Date: Tue, 1 Mar 2022 13:21:27 +0100 Subject: [PATCH] vkd3d: Properly compare integers in compare_descriptor_range(). Signed-off-by: Henri Verbeet Signed-off-by: Alexandre Julliard --- libs/vkd3d/state.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libs/vkd3d/state.c b/libs/vkd3d/state.c index ffd92d1a..2d3954d2 100644 --- a/libs/vkd3d/state.c +++ b/libs/vkd3d/state.c @@ -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; int ret; - if ((ret = range_a->type - range_b->type)) + if ((ret = vkd3d_u32_compare(range_a->type, range_b->type))) return ret; - if ((ret = range_a->offset - range_b->offset)) + if ((ret = vkd3d_u32_compare(range_a->offset, range_b->offset))) return ret; return (range_a->descriptor_count == UINT_MAX) - (range_b->descriptor_count == UINT_MAX);