From 8c1ff1e19116039cf139356cec9107d41ccc5a30 Mon Sep 17 00:00:00 2001 From: levkovigor Date: Tue, 24 Aug 2021 11:08:46 +0300 Subject: [PATCH] Update PPPOSClient.cpp --- src/PPPOSClient.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/PPPOSClient.cpp b/src/PPPOSClient.cpp index c88caf9..007ef4e 100644 --- a/src/PPPOSClient.cpp +++ b/src/PPPOSClient.cpp @@ -235,7 +235,7 @@ int PPPOSClient::read(uint8_t *buf, size_t size) { int res = -1; int j = 0; if (available()){ - for (int i = _startPos; i < _endPos; i++) { + for (int i = _startPos; i < (_endPos - 1); i++) { if (j < size) { buf[j] = RxBuffer[i]; } else {