Rolling back

This commit is contained in:
Anton Dolozin 2025-09-30 13:42:44 +02:00
parent 539a6a08fc
commit 64c810a801

View File

@ -100,7 +100,11 @@ int main() {
printf("Zadaj hladanu surovinu:\n");
/// pole pre hl'adane
char search[LINE_SIZE];
/// ked' nenacitame, ukoncime program
if (!fgets(search, sizeof(search), stdin)) {
return 1;}
/// pre hl'adanie, potrebujeme najst', kde je novy riadok and premenit' ho na null terminator pre porovnanie
search[strcspn(search, "\n")] = '\0';
printf("Zadaj jedalny listok:\n");
/// pocet nacitanych poloziek
int loaded = 0;