mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2024-12-27 09:58:45 +01:00
don't crash when ctrl-d hit in console
This commit is contained in:
parent
4123de3560
commit
70e4d06e73
1 changed files with 3 additions and 2 deletions
|
@ -764,8 +764,9 @@ ctrl_thread_main( void* arg )
|
|||
ssize_t nGot = recv( sock, buf, sizeof(buf)-1, 0 );
|
||||
if ( 0 >= nGot ) {
|
||||
break;
|
||||
} else if ( 1 == nGot ) {
|
||||
assert( 0 ); /* not happening, as getting \r\n terminator */
|
||||
} else if ( 1 == nGot ) { /* ctrl-d */
|
||||
logf( XW_LOGINFO, "%s: exiting; got ctrl-d?", __func__ );
|
||||
break;
|
||||
} else if ( 2 == nGot ) {
|
||||
/* user hit return; repeat prev command */
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue