소스 검색

Fix faux_str_charsn()

Serj Kalichev 1 년 전
부모
커밋
d8efd996f9
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      faux/str/str.c

+ 1 - 1
faux/str/str.c

@@ -673,7 +673,7 @@ char *faux_str_charsn(const char *str, const char *chars_to_search, size_t n)
 	if (!str || !chars_to_search)
 		return NULL;
 
-	while ((*current_char != '\0') && (len > 0)) {
+	while ((len > 0) && (*current_char != '\0')) {
 		if (strchr(chars_to_search, *current_char))
 			return (char *)current_char;
 		current_char++;