Make sure fish_indent handles io erros

darcs-hash:20080113164905-75c98-b090ce79fb50a260874951525218cac65a097a6d.gz
This commit is contained in:
liljencrantz 2008-01-14 02:49:05 +10:00
parent 87db9517e9
commit 8d2564291d

View File

@ -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;
}