Deference + increment pointer on single line

This commit is contained in:
0x1eef 2023-09-22 16:57:59 -03:00
parent d6b4cb0f48
commit 96c7b39a18

View file

@ -56,10 +56,9 @@ static bool
has_consecutive_chars(const char *str, char c, int n)
{
for (int i = 0; i < n; i++) {
if (*str != c) {
if (*str++ != c) {
return 0;
}
str++;
}
return 1;
}