diff options
Diffstat (limited to 'src/list.c')
-rw-r--r-- | src/list.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/list.c b/src/list.c index 8e67a61db..16e59837e 100644 --- a/src/list.c +++ b/src/list.c @@ -1945,7 +1945,13 @@ item_compare2(const void *s1, const void *s2) if (res == FAIL) res = ITEM_COMPARE_FAIL; else + { res = (int)tv_get_number_chk(&rettv, &sortinfo->item_compare_func_err); + if (res > 0) + res = 1; + else if (res < 0) + res = -1; + } if (sortinfo->item_compare_func_err) res = ITEM_COMPARE_FAIL; // return value has wrong type clear_tv(&rettv); |