oOOooooOo game<->game mystery crash oOOooOOooooOoo

このコミットが含まれているのは:
ninya9k 2023-11-15 12:35:13 +00:00
コミット 9369bad57c
1個のファイルの変更3行の追加3行の削除

6
uttt.c
ファイルの表示

@ -510,7 +510,7 @@ int ut_network_game(struct ut_state *state, int sock, char player, bool readable
int r = 4, c = 4;
ut_curserase();
ut_cursdraw(state);
ut_sockdraw(state, sock);
if (readable) ut_sockdraw(state, sock);
char w = ut_winner((char *)state->boards, 0, 3);
if(w)
{
@ -597,7 +597,7 @@ int ut_host_game(struct ut_state *state) {
// check to determine readable
char byte;
ut_dprintf(conn, "| Press enter to start: ");
ut_dprintf(conn, "| Press enter to start.\n");
if (ut_readfill(conn, &byte, 1)) {
printf("Connection closed.\n");
return 1;
@ -642,7 +642,7 @@ int ut_join_game(struct ut_state *state) {
}
// tell host to deactivate readable
ut_dprintf(sock, "\0\n");
ut_writefill(sock, "\0\n", 2);
// host decides X or O
char player_buf[2];