oOOooooOo game<->game mystery crash oOOooOOooooOoo
このコミットが含まれているのは:
コミット
9369bad57c
6
uttt.c
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];
|
||||
|
|
読み込み中…
新しいイシューから参照