Fixed compiler warning for unchecked fgets return value.

This commit is contained in:
Matthew Budd 2020-06-20 00:39:44 -04:00
parent 6271d63ba6
commit 9a30cce921
1 changed files with 8 additions and 3 deletions

View File

@ -252,9 +252,14 @@ FCEUD_SendData(void *data,
if(!error && check) {
char buf[1024];
char *f;
fgets(buf, 1024, stdin);
if((f=strrchr(buf,'\n'))) {
*f = 0;
buf[0] = 0;
if ( fgets(buf, 1024, stdin) )
{
if((f=strrchr(buf,'\n'))) {
*f = 0;
}
}
FCEUI_NetplayText((uint8 *)buf);
}