File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed
Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -190,6 +190,7 @@ bool freadCleanup(void)
190190static inline uint64_t umax (uint64_t a , uint64_t b ) { return a > b ? a : b ; }
191191static inline uint64_t umin (uint64_t a , uint64_t b ) { return a < b ? a : b ; }
192192static inline int64_t imin ( int64_t a , int64_t b ) { return a < b ? a : b ; }
193+ static inline int iminInt ( int a , int b ) { return a < b ? a : b ; }
193194
194195/** Return value of `x` clamped to the range [upper, lower] */
195196static inline int64_t clamp_i64t (int64_t x , int64_t lower , int64_t upper ) {
@@ -2537,7 +2538,7 @@ int freadMain(freadMainArgs _args) {
25372538 typeName [IGNORE_BUMP (joldType )], typeName [IGNORE_BUMP (thisType )],
25382539 (int )(tch - fieldStart ), fieldStart , (int64_t )(ctx .DTi + myNrow ));
25392540
2540- len = min (len , sizeof (buffer ));
2541+ len = iminInt (len , sizeof (buffer ));
25412542
25422543 typeBumpMsg = realloc (typeBumpMsg , typeBumpMsgSize + len + 1 );
25432544 strcpy (typeBumpMsg + typeBumpMsgSize , buffer );
You can’t perform that action at this time.
0 commit comments