Update PPPOSClient.cpp

This commit is contained in:
levkovigor 2021-08-24 11:08:46 +03:00 committed by GitHub
parent 51578c6ac2
commit 8c1ff1e191
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -235,7 +235,7 @@ int PPPOSClient::read(uint8_t *buf, size_t size) {
int res = -1; int res = -1;
int j = 0; int j = 0;
if (available()){ if (available()){
for (int i = _startPos; i < _endPos; i++) { for (int i = _startPos; i < (_endPos - 1); i++) {
if (j < size) { if (j < size) {
buf[j] = RxBuffer[i]; buf[j] = RxBuffer[i];
} else { } else {