mirror of
https://github.com/yhirose/cpp-httplib
synced 2024-11-21 14:29:10 -07:00
Fix #494
This commit is contained in:
parent
ab563ff52c
commit
b91540514d
1 changed files with 2 additions and 2 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue