diff --git a/build/test/out/c/quizduell.o b/build/test/out/c/quizduell.o index 943ddd0..5efec2f 100644 Binary files a/build/test/out/c/quizduell.o and b/build/test/out/c/quizduell.o differ diff --git a/build/test/out/test_quizduell.out b/build/test/out/test_quizduell.out index ea4443f..adcbf15 100644 Binary files a/build/test/out/test_quizduell.out and b/build/test/out/test_quizduell.out differ diff --git a/build/test/results/test_casualQuiz.pass b/build/test/results/test_casualQuiz.pass index aa0233e..cd3cde9 100644 --- a/build/test/results/test_casualQuiz.pass +++ b/build/test/results/test_casualQuiz.pass @@ -11,4 +11,4 @@ :failed: 0 :ignored: 0 :stdout: [] -:time: 0.020077599998330697 +:time: 0.02163599999039434 diff --git a/build/test/results/test_quizduell.pass b/build/test/results/test_quizduell.pass index bdd67a5..c277ff2 100644 --- a/build/test/results/test_quizduell.pass +++ b/build/test/results/test_quizduell.pass @@ -51,4 +51,4 @@ :failed: 0 :ignored: 0 :stdout: [] -:time: 0.039269100001547486 +:time: 0.05005920000257902 diff --git a/build/test/results/test_timequiz.pass b/build/test/results/test_timequiz.pass index 0c1305d..ad408f5 100644 --- a/build/test/results/test_timequiz.pass +++ b/build/test/results/test_timequiz.pass @@ -11,4 +11,4 @@ :failed: 0 :ignored: 0 :stdout: [] -:time: 0.022210399998584762 +:time: 0.021275600010994822 diff --git a/build/test/results/test_wwm.pass b/build/test/results/test_wwm.pass index d5a6f13..8e54e6a 100644 --- a/build/test/results/test_wwm.pass +++ b/build/test/results/test_wwm.pass @@ -11,4 +11,4 @@ :failed: 0 :ignored: 0 :stdout: [] -:time: 0.024773599987383932 +:time: 0.019954899995354936 diff --git a/src/quizduell.c b/src/quizduell.c index 5080597..45b0c78 100644 --- a/src/quizduell.c +++ b/src/quizduell.c @@ -166,8 +166,8 @@ void quizduell() { zeigeVerfuegbareKategorien(kategorien); printf("Your selection: "); - if (scanf("%s", auswahl) != 1) { - } + fgets(auswahl, sizeof(auswahl), stdin); + auswahl[strcspn(auswahl, "\n")] = '\0'; typedef int CategoryIndex; CategoryIndex auswahlIndex = -1;