We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 941f056 commit ff96dc6Copy full SHA for ff96dc6
game.c
@@ -199,7 +199,8 @@ global_terminate( void ) {
199
200
static void
201
setup_game( const char *file_name, int *side_to_move ) {
202
- char buffer[65];
+ int BUFFER_SIZE = 70;
203
+ char buffer[BUFFER_SIZE];
204
int i, j;
205
int pos, token;
206
FILE *stream;
@@ -222,7 +223,7 @@ setup_game( const char *file_name, int *side_to_move ) {
222
223
stream = fopen( file_name, "r" );
224
if ( stream == NULL )
225
fatal_error( "%s '%s'\n", GAME_LOAD_ERROR, file_name );
- fgets( buffer, 70, stream );
226
+ fgets(buffer, BUFFER_SIZE, stream );
227
token = 0;
228
for ( i = 1; i <= 8; i++ )
229
for ( j = 1; j <= 8; j++ ) {
0 commit comments