Skip to content

Commit a33dac3

Browse files
committed
2 parents 6a740d4 + a2c5fca commit a33dac3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Adafruit_MQTT_FONA.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,8 @@ class Adafruit_MQTT_FONA : public Adafruit_MQTT {
7474
DEBUG_PRINT('!');
7575

7676
if (len + avail > maxlen) {
77-
// oof we cant read more of the available data in this buffer
78-
return len;
77+
avail = maxlen - len;
78+
if (avail == 0) return len;
7979
}
8080

8181
// try to read the data into the end of the pointer

0 commit comments

Comments
 (0)