Skip to content

Commit 49cffc2

Browse files
author
Mirela Chirica
committed
Mem_str comparation was too short
1 parent c31199b commit 49cffc2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

features/cellular/framework/AT/ATHandler.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -930,7 +930,7 @@ void ATHandler::set_string(char *dest, const char *src, size_t src_len)
930930
const char* ATHandler::mem_str(const char* dest, size_t dest_len, const char* src, size_t src_len)
931931
{
932932
if (dest_len > src_len) {
933-
for(size_t i = 0; i < dest_len-src_len; ++i) {
933+
for(size_t i = 0; i < dest_len-src_len+1; ++i) {
934934
if(memcmp(dest+i, src, src_len) == 0) {
935935
return dest+i;
936936
}

0 commit comments

Comments
 (0)