Fix infinite loop in 2000/robison w/invalid input

If someone entered invalid input (say because they don't know the format
yet or because they make a typo or some other reason) their terminal
would be flooded with an error message, forcing them to kill the game.
This was done in much the same way as the fix for 1987/lievaart. Without
this fix the words:

    Black position and direction: illegal

would flood the screen.

The Makefile CINCLUDE now has -include stdio.h (not strictly necessary
however).

Format and typo check README.md.
This commit is contained in:
Cody Boone Ferguson committed 2023-11-14 11:49:59 -08:00
1 parent 396f92f9b0
commit 5a99d745c5
4 files changed
+65 -28

No files matched your search

+37 -15
View File
@@ -689,22 +689,44 @@ C
o&
4)
{
o&
1?
char
X1[
5]=
{'\
\0'}
,X2
[5]
={\
'\0\
'};
C o
&1
){
scanf
("%d"
,&
n)
:(
("%4s"
,X1);
n=at\
oi(X1);
}else
{X1[
0]=
'\
\0'
;X2
[0]
='\0';
scanf
("%d%d"
,&
m,
&n
),
--
m)
;
("%4s\
%4s",
X1,
X2);
m=
atoi
(X1);
n=
atoi
(X2)
;--m;
Z=
A
N>>
@@ -729,7 +751,7 @@ B,
H"{ ; { { } { } { ; } ; { "
))
;
}
}}
}
else
{