diff options
-rw-r--r-- | fish_indent.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/fish_indent.c b/fish_indent.c index 3fcb54de..59226ad8 100644 --- a/fish_indent.c +++ b/fish_indent.c @@ -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; } |