diff --git a/src/network/res_send.c b/src/network/res_send.c index b9cea0bfd5663de2e5e2bd5aca618eec48f57354..ee4abf1f1ade69273c72ac3c963d038e6a813ffb 100644 --- a/src/network/res_send.c +++ b/src/network/res_send.c @@ -3,7 +3,7 @@ int __res_send(const unsigned char *msg, int msglen, unsigned char *answer, int anslen) { int r = __res_msend(1, &msg, &msglen, &answer, &anslen, anslen); - return r<0 ? r : anslen; + return r<0 || !anslen ? -1 : anslen; } weak_alias(__res_send, res_send);