[TD-6088]<fix> handle bigint sum

This commit is contained in:
yihaoDeng 2021-08-18 01:08:22 +00:00
parent 00d082806e
commit 0e0e727eaf
1 changed files with 1 additions and 5 deletions

View File

@ -38,11 +38,7 @@ const int32_t TYPE_BYTES[15] = {
#define DO_STATICS(__sum, __min, __max, __minIndex, __maxIndex, _list, _index) \
do { \
if (_list[(_index)] >= (INT64_MAX - (__sum))) { \
__sum = INT64_MAX; \
} else { \
(__sum) += (_list)[(_index)]; \
} \
(__sum) += (_list)[(_index)]; \
if ((__min) > (_list)[(_index)]) { \
(__min) = (_list)[(_index)]; \
(__minIndex) = (_index); \