Flush stdout before getting the user's response (otherwise the user never
authorDavid Given <dg@cowlark.com>
Sat, 17 Oct 2015 22:47:31 +0000 (00:47 +0200)
committerDavid Given <dg@cowlark.com>
Sat, 17 Oct 2015 22:47:31 +0000 (00:47 +0200)
sees anything).

Applications/V7/games/arithmetic.c

index 331e762..acf292c 100644 (file)
@@ -25,6 +25,7 @@ void getline(char *s)
 
        rs = s;
 
+       fflush(stdout);
        while ((*rs = getchar()) == ' ');
        while (*rs != '\n')
                if (*rs == 0)