From 0641d64bc01157ff3820caf4dff5c89bec97ccb3 Mon Sep 17 00:00:00 2001 From: Wang Renxin Date: Sat, 25 Nov 2017 19:55:21 +0800 Subject: [PATCH] *fixed a number comparison bug. --- core/my_basic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/my_basic.c b/core/my_basic.c index fc5345f..592a0aa 100755 --- a/core/my_basic.c +++ b/core/my_basic.c @@ -9995,7 +9995,7 @@ static int _compare_numbers(const _object_t* first, const _object_t* second) { } else { if((first->type == _DT_INT ? (real_t)first->data.integer : first->data.float_point) > (second->type == _DT_INT ? (real_t)second->data.integer : second->data.float_point)) result = 1; - else if((first->type == _DT_INT ? (real_t)first->data.integer : first->data.float_point) > (second->type == _DT_INT ? (real_t)second->data.integer : second->data.float_point)) + else if((first->type == _DT_INT ? (real_t)first->data.integer : first->data.float_point) < (second->type == _DT_INT ? (real_t)second->data.integer : second->data.float_point)) result = -1; }