diff --git a/src/core/dns.c b/src/core/dns.c index 93657f94..45b416b4 100644 --- a/src/core/dns.c +++ b/src/core/dns.c @@ -1083,7 +1083,7 @@ dns_recv(void *arg, struct udp_pcb *pcb, struct pbuf *p, ip_addr_t *addr, u16_t /* deallocate memory and return */ goto memerr; } else { - res_idx = SIZEOF_DNS_ANSWER + htons(ans.len); + res_idx += SIZEOF_DNS_ANSWER + htons(ans.len); } --nanswers; }