Skip to content

Commit b9de88a

Browse files
fix #1
1 parent 0ad0fde commit b9de88a

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

game.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
#include "terminal.h"
55
#include <ctype.h>
66
#include <stdio.h>
7+
#include <stdlib.h>
78
#include <string.h>
89

910
inline bool won() {
@@ -17,7 +18,9 @@ inline bool won() {
1718

1819
inline void game() {
1920
char input;
20-
scanf("%c", &input);
21+
if (!scanf("%c", &input)) {
22+
exit(1);
23+
}
2124
union Selectable dest;
2225
switch (input) {
2326
case 'q':

0 commit comments

Comments
 (0)