Fixed crash bug #33
This commit is contained in:
parent
1c58120c03
commit
155350b61b
|
@ -66,7 +66,6 @@ size_t hub_recvq_set(struct hub_recvq* q, void* buf, size_t bufsize)
|
|||
|
||||
if (!bufsize)
|
||||
{
|
||||
q->size = 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -204,7 +204,7 @@ void net_on_read(int fd, short ev, void *arg)
|
|||
|
||||
if (start < buf + buf_size)
|
||||
{
|
||||
hub_recvq_set(q, buf+offset, buf_size);
|
||||
hub_recvq_set(q, buf+offset, buf_size - offset);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue