From 3bdbb10608555645f44cd8f9a0bc809b92bca8ca Mon Sep 17 00:00:00 2001 From: Jeff Tao Date: Wed, 12 Jun 2024 22:39:02 +0800 Subject: [PATCH] fix:[TD-30579]compile error in macOS 14.5 and m3 chip --- source/common/src/tvariant.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/common/src/tvariant.c b/source/common/src/tvariant.c index 06ba3a5a59..aad877312b 100644 --- a/source/common/src/tvariant.c +++ b/source/common/src/tvariant.c @@ -172,7 +172,7 @@ int32_t toIntegerEx(const char *z, int32_t n, uint32_t type, int64_t *value) { } break; case TK_NK_FLOAT: { double val = round(taosStr2Double(z, &endPtr)); - if(val >= (double)INT64_MIN && val <= (double)INT64_MAX){ + if(val < (double)INT64_MIN || val > (double)INT64_MAX){ return TSDB_CODE_FAILED; } if (errno == ERANGE || errno == EINVAL || endPtr - z != n) {