Skip to content
Snippets Groups Projects
Commit 622ec0f0 authored by deuce's avatar deuce
Browse files

Fix ret/copied confusion in last commit.

parent 1ca116da
No related branches found
No related tags found
No related merge requests found
...@@ -190,13 +190,13 @@ static ptrdiff_t js_socket_recv(js_socket_private_t *p, void *buf, size_t len, i ...@@ -190,13 +190,13 @@ static ptrdiff_t js_socket_recv(js_socket_private_t *p, void *buf, size_t len, i
return total; return total;
return ret; return ret;
} }
if (!(flags & MSG_WAITALL) || p->nonblocking) if ((!(flags & MSG_WAITALL)) || p->nonblocking)
return ret; return ret;
total += copied; total += ret;
if(total>=(ptrdiff_t)len) if(total>=(ptrdiff_t)len)
return total; return total;
len-=copied; len-=ret;
buf=((uint8_t *)buf) + copied; buf=((uint8_t *)buf) + ret;
if(!socket_check(p->sock,NULL,NULL,0)) { if(!socket_check(p->sock,NULL,NULL,0)) {
if (total > 0) if (total > 0)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment