From c0dc9de43fe20448da2cc204f5067b029a19653d Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Tue, 14 Nov 2023 19:25:14 +0100 Subject: [PATCH] fix for ultra recovery --- tools/mfkey/nested_util.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tools/mfkey/nested_util.c b/tools/mfkey/nested_util.c index 4b2b86c4c..f2910de74 100644 --- a/tools/mfkey/nested_util.c +++ b/tools/mfkey/nested_util.c @@ -36,9 +36,10 @@ typedef struct { uint32_t endPos; } RecPar; - -static int compar_int(const void *a, const void *b) { - return (*(uint64_t *)b - * (uint64_t *)a); +inline static int compar_int(const void *a, const void *b) { + if (*(uint64_t *)b == *(uint64_t *)a) return 0; + if (*(uint64_t *)b < * (uint64_t *)a) return 1; + return -1; } // Compare countKeys structure