diff options
author | Karlson2k <k2k@narod.ru> | 2016-04-25 12:12:26 +0300 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2016-04-25 11:25:18 +0200 |
commit | 224238491102ec54173eb1e3e3b5cfe16806a770 (patch) | |
tree | 55cebcb240c0c395990d47a728526218fa1b3671 | |
parent | 27a6393cee43f8a98eab73be39e89628b8723f9a (diff) |
url.c: fixed DEBUGASSERT() for WinSock workaround
If buffer is allocated, but nothing is received during prereceive
stage, than number of processed bytes must be zero.
Closes #778
-rw-r--r-- | lib/url.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -2701,7 +2701,9 @@ static void conn_reset_postponed_data(struct connectdata *conn, int num) if(psnd->buffer) { DEBUGASSERT(psnd->allocated_size > 0); DEBUGASSERT(psnd->recv_size <= psnd->allocated_size); - DEBUGASSERT(psnd->recv_processed < psnd->recv_size); + DEBUGASSERT(psnd->recv_size ? + (psnd->recv_processed < psnd->recv_size) : + (psnd->recv_processed == 0)); DEBUGASSERT(psnd->bindsock != CURL_SOCKET_BAD); free(psnd->buffer); psnd->buffer = NULL; |