fix:[TD-30579]compile error in macOS 14.5 and m3 chip

This commit is contained in:
Jeff Tao 2024-06-12 22:39:02 +08:00
parent ad0dd88ba1
commit 3bdbb10608
1 changed files with 1 additions and 1 deletions

View File

@ -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) {