Skip to content

Commit de10446

Browse files
Fixed bug that incremented _smsDataIndex in peek, clipping the first letter of a incoming message
1 parent c6cba3c commit de10446

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/NB_SMS.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,7 @@ int NB_SMS::peek()
394394
return *_ptrUTF8;
395395
}
396396
if (_smsDataIndex < (signed)_incomingBuffer.length() && _smsDataIndex <= _smsDataEndIndex) {
397-
char c = _incomingBuffer[_smsDataIndex++];
397+
char c = _incomingBuffer[_smsDataIndex+1];
398398
if (_charset == SMS_CHARSET_GSM
399399
&& (c >= 0x80 || c <= 0x24 || (c&0x1F) == 0 || (c&0x1F) >= 0x1B)) {
400400
for (auto &gsmchar : _gsmUTF8map) {

0 commit comments

Comments
 (0)