Cellular: ATHandler's mem_str fixed to work on matching strings

pull/8401/head
Mirela Chirica 2018-09-20 10:38:33 +03:00
parent 273590f615
commit 4e6cbb8f5f
1 changed files with 1 additions and 1 deletions

View File

@ -1035,7 +1035,7 @@ void ATHandler::set_string(char *dest, const char *src, size_t src_len)
const char *ATHandler::mem_str(const char *dest, size_t dest_len, const char *src, size_t src_len)
{
if (dest_len > src_len) {
if (dest_len >= src_len) {
for (size_t i = 0; i < dest_len - src_len + 1; ++i) {
if (memcmp(dest + i, src, src_len) == 0) {
return dest + i;