8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 055af9a commit cc8310fCopy full SHA for cc8310f
src/EthernetClient.cpp
@@ -171,7 +171,7 @@ int EthernetClient::peek()
171
if (!available()) {
172
return -1;
173
}
174
- b = pbuf_get_at(_tcp_client->data.p, 0);
+ b = pbuf_get_at(_tcp_client->data.p, _tcp_client->data.p->tot_len - _tcp_client->data.available);
175
return b;
176
177
src/EthernetUdp.cpp
@@ -247,7 +247,7 @@ int EthernetUDP::peek()
247
if (!_remaining) {
248
249
250
- b = pbuf_get_at(_udp.data.p, 0);
+ b = pbuf_get_at(_udp.data.p, _udp.data.p->tot_len - _udp.data.available);
251
252
253
0 commit comments