Skip to content

Commit

Permalink
Make sure fish_indent handles io erros
Browse files Browse the repository at this point in the history
darcs-hash:20080113164905-75c98-b090ce79fb50a260874951525218cac65a097a6d.gz
  • Loading branch information
liljencrantz committed Jan 13, 2008
1 parent 87db951 commit 8d25642
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions fish_indent.c
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,16 @@ static void read_file( FILE *f, string_buffer_t *b )
{
while( 1 )
{
errno=0;
wint_t c = fgetwc( f );
if( c == WEOF )
{
if( errno )
{
wperror(L"fgetwc");
exit(1);
}

break;
}

Expand Down

0 comments on commit 8d25642

Please sign in to comment.