Skip to content

Commit 2a4cbe4

Browse files
committed
fixed mingw support
1 parent bf8503a commit 2a4cbe4

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/fread.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,7 @@ bool freadCleanup(void)
190190
static inline uint64_t umax(uint64_t a, uint64_t b) { return a > b ? a : b; }
191191
static inline uint64_t umin(uint64_t a, uint64_t b) { return a < b ? a : b; }
192192
static 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] */
195196
static 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);

0 commit comments

Comments
 (0)