We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f242682 commit 79fdf90Copy full SHA for 79fdf90
1 file changed
src/prism.c
@@ -22620,8 +22620,11 @@ static const char *
22620
pm_strnstr(const char *big, const char *little, size_t big_length) {
22621
size_t little_length = strlen(little);
22622
22623
- for (const char *big_end = big + big_length; big < big_end; big++) {
+
22624
+ while (big_length >= little_length) {
22625
if (*big == *little && memcmp(big, little, little_length) == 0) return big;
22626
+ big_length--;
22627
+ big++;
22628
}
22629
22630
return NULL;
0 commit comments