Compare commits
No commits in common. "fd7423542172415770c3aee5b23db7e43ebf4c37" and "b1c99ee760b96988590e1f58d5cf302e83191774" have entirely different histories.
fd74235421
...
b1c99ee760
Binary file not shown.
@ -46,7 +46,7 @@ void deshifr (char *text) {
|
||||
text[i] = tolower(text[i]);
|
||||
}
|
||||
}
|
||||
s
|
||||
|
||||
int search_string (const char* heap_orig, const char* needle_orig) {
|
||||
char heap[LINESIZE];
|
||||
char needle[LINESIZE];
|
||||
@ -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 o;
|
||||
for (o = 0; o < needle_len; o++) {
|
||||
if (heap[i+o] != needle[o]) {
|
||||
int j;
|
||||
for (j = 0; j < needle_len; j++) {
|
||||
if (heap[i+j] != needle[j]) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (o == needle_len) {
|
||||
if (j == needle_len) {
|
||||
return i;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user