mirror of
https://github.com/yhirose/cpp-httplib.git
synced 2026-11-02 13:30:34 +00:00
Fix #494
This commit is contained in:
1 parent
ab563ff52c
commit
b91540514d
1 file changed
+2
-2
@@ -3417,7 +3417,7 @@ inline ssize_t SocketStream::read(char *ptr, size_t size) {
|
||||
if (!is_readable()) { return -1; }
|
||||
|
||||
#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 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; }
|
||||
|
||||
#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 send(sock_, ptr, static_cast<int>(size), 0);
|
||||
|
||||
Reference in new issue
Block a user