Skip to content

Commit a6a7f71

Browse files
authored
Merge pull request #100 from Patrick-McGuire/master
Fix bug in SMS::peek(), and allow for multiple CIDs in GPRS::ready()
2 parents c6cba3c + f0e5bfc commit a6a7f71

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/GPRS.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ int GPRS::ready()
127127
_state = GPRS_STATE_IDLE;
128128
_status = ERROR;
129129
} else {
130-
if (_response.endsWith("1,1")) {
130+
if (_response.indexOf("1,1") >= 0) {
131131
_state = GPRS_STATE_IDLE;
132132
_status = GPRS_READY;
133133
ready = 1;

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)