Commit b435dc1c authored by Michele Imbriani - Oticon's avatar Michele Imbriani - Oticon Committed by Carles Cufi
Browse files

bluetooth: shell: Fixed logic in is_substring function



Fixed the character check in is_substring function.

Signed-off-by: default avatarMichele Imbriani - Oticon <mbim@demant.com>
parent a12dff48
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -169,7 +169,7 @@ static bool is_substring(const char *substr, const char *str)
	}

	for (size_t pos = 0; pos < str_len; pos++) {
		if (tolower(substr[0]) == tolower(str[pos])) {
		if (tolower(substr[pos]) == tolower(str[pos])) {
			if (pos + sub_str_len > str_len) {
				return false;
			}