From bacc2869ef651c8c239cf3f8b1f953ab548306b5 Mon Sep 17 00:00:00 2001 From: Yurii Yakovenko Date: Tue, 1 Oct 2024 19:14:47 +0000 Subject: [PATCH] Update cv1/program.c --- cv1/program.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/cv1/program.c b/cv1/program.c index a2a72ab..d467b38 100644 --- a/cv1/program.c +++ b/cv1/program.c @@ -24,7 +24,8 @@ bool check(char* s2, char *pz) s[i]=shifer[s[i]-'0']; } - } + } + s[strlen(s2)]=0; bool rez=strstr(s, pz)!=NULL; free(s); return rez; @@ -70,4 +71,5 @@ int main() printf("Nacitanyh %d poloziek", count); return 0; -} \ No newline at end of file +} +