Skip to content

Commit c7252a9

Browse files
authored
fix recv_at_least() (#593)
1 parent 5ba5018 commit c7252a9

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

net/basic_socket.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,7 @@ ssize_t ISocketStream::recv_at_least(void* buf, size_t count, size_t least, int
269269
if (ret < 0) return ret;
270270
if (ret == 0) break; // EOF
271271
if ((n += ret) >= least) break;
272+
(char*&)buf += ret;
272273
count -= ret;
273274
} while (count);
274275
return n;

0 commit comments

Comments
 (0)