refresh
This commit is contained in:
parent
b1c99ee760
commit
0f9b5259b3
Binary file not shown.
@ -58,13 +58,13 @@ int search_string (const char* heap_orig, const char* needle_orig) {
|
||||
int needle_len = strlen(needle);
|
||||
|
||||
for (int i = 0; i <= heap_len - needle_len; i++) {
|
||||
int j;
|
||||
for (j = 0; j < needle_len; j++) {
|
||||
if (heap[i+j] != needle[j]) {
|
||||
int o;
|
||||
for (o = 0; o < needle_len; o++) {
|
||||
if (heap[i+o] != needle[o]) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (j == needle_len) {
|
||||
if (o == needle_len) {
|
||||
return i;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user