Обновить cv1/program.c

This commit is contained in:
Yevhen Kozirovskyi 2024-10-01 21:57:29 +00:00
parent fb4edab25d
commit caa09c8456

View File

@ -52,7 +52,8 @@ int main() {
int matches = 0; int matches = 0;
for (int i = 0; i < count; i++) { for (int i = 0; i < count; i++) {
char decoded_name[MAX_NAME_LEN]; char decoded_name[MAX_NAME_LEN];
strcpy(decoded_name, dishes[i][0]); strncpy(decoded_name, dishes[i][0], MAX_NAME_LEN - 1);
decoded_name[MAX_NAME_LEN - 1] = '\0';
decodovane_slovo(decoded_name); decodovane_slovo(decoded_name);