Skip to content

Commit b915405

Browse files
committed
Fix #494
1 parent ab563ff commit b915405

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

httplib.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3417,7 +3417,7 @@ inline ssize_t SocketStream::read(char *ptr, size_t size) {
34173417
if (!is_readable()) { return -1; }
34183418

34193419
#ifdef _WIN32
3420-
if (size > static_cast<size_t>(std::numeric_limits<int>::max())) {
3420+
if (size > static_cast<size_t>((std::numeric_limits<int>::max)())) {
34213421
return -1;
34223422
}
34233423
return recv(sock_, ptr, static_cast<int>(size), 0);
@@ -3430,7 +3430,7 @@ inline ssize_t SocketStream::write(const char *ptr, size_t size) {
34303430
if (!is_writable()) { return -1; }
34313431

34323432
#ifdef _WIN32
3433-
if (size > static_cast<size_t>(std::numeric_limits<int>::max())) {
3433+
if (size > static_cast<size_t>((std::numeric_limits<int>::max)())) {
34343434
return -1;
34353435
}
34363436
return send(sock_, ptr, static_cast<int>(size), 0);

0 commit comments

Comments
 (0)