Просмотр исходного кода

Merge pull request #12 from lzszero/fix-cmp-bug

修复cmp函数逻辑错误(fixes #11)
Yuqiang Wang 5 месяцев назад
Родитель
Сommit
8f4134a67b
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      nopoll/nopoll.c

+ 1 - 1
nopoll/nopoll.c

@@ -67,7 +67,7 @@ nopoll_bool nopoll_cmp (const char * string1, const char * string2)
 
 	/* next position */
 	iterator = 0;
-	while (string1[iterator] && string1[iterator]) {
+	while (string1[iterator] && string2[iterator]) {
 		if (string1[iterator] != string2[iterator])
 			return nopoll_false;
 		iterator++;