From e844fa3336ceac39f3a0c268eaff908edbfb1a17 Mon Sep 17 00:00:00 2001 From: Nakidai Date: Thu, 12 Jun 2025 07:40:15 +0300 Subject: Better search --- fp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'fp.c') diff --git a/fp.c b/fp.c index fa54bc3..6ff2447 100644 --- a/fp.c +++ b/fp.c @@ -89,10 +89,10 @@ int colcmp(const void *_left, const void *_right) const struct result *left = _left, *right = _right; if (left->c.length != right->c.length) return left->c.length < right->c.length ? 1 : -1; + if (left->c.offset != right->c.offset) + return left->c.offset < right->c.offset ? -1 : 1; if (left->c.fullness != right->c.fullness) return left->c.fullness < right->c.fullness ? -1 : 1; - if (left->c.offset != right->c.offset) - return left->c.offset < right->c.offset ? 1 : -1; return -strcmp(left->name, right->name); } -- cgit 1.4.1