[TD-6088]<fix> handel bigint sum

This commit is contained in:
yihaoDeng 2021-08-18 02:53:55 +00:00
parent e4de1574a2
commit cdac4b6d40
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) \ #define DO_STATICS(__sum, __min, __max, __minIndex, __maxIndex, _list, _index) \
do { \ do { \
if (_list[(_index)] >= (INT64_MAX - (__sum))) { \ (__sum) += (_list)[(_index)]; \
__sum = INT64_MAX; \
} else { \
(__sum) += (_list)[(_index)]; \
} \
if ((__min) > (_list)[(_index)]) { \ if ((__min) > (_list)[(_index)]) { \
(__min) = (_list)[(_index)]; \ (__min) = (_list)[(_index)]; \
(__minIndex) = (_index); \ (__minIndex) = (_index); \