yhirose 5 years ago
parent
commit
b91540514d
1 changed files with 2 additions and 2 deletions
  1. 2 2
      httplib.h

+ 2 - 2
httplib.h

@@ -3417,7 +3417,7 @@ inline ssize_t SocketStream::read(char *ptr, size_t size) {
   if (!is_readable()) { return -1; }
   if (!is_readable()) { return -1; }
 
 
 #ifdef _WIN32
 #ifdef _WIN32
-  if (size > static_cast<size_t>(std::numeric_limits<int>::max())) {
+  if (size > static_cast<size_t>((std::numeric_limits<int>::max)())) {
     return -1;
     return -1;
   }
   }
   return recv(sock_, ptr, static_cast<int>(size), 0);
   return recv(sock_, ptr, static_cast<int>(size), 0);
@@ -3430,7 +3430,7 @@ inline ssize_t SocketStream::write(const char *ptr, size_t size) {
   if (!is_writable()) { return -1; }
   if (!is_writable()) { return -1; }
 
 
 #ifdef _WIN32
 #ifdef _WIN32
-  if (size > static_cast<size_t>(std::numeric_limits<int>::max())) {
+  if (size > static_cast<size_t>((std::numeric_limits<int>::max)())) {
     return -1;
     return -1;
   }
   }
   return send(sock_, ptr, static_cast<int>(size), 0);
   return send(sock_, ptr, static_cast<int>(size), 0);