From d91745c921fa9356a85dcf100a8fe00c3bbbeb97 Mon Sep 17 00:00:00 2001 From: hyung-hwan Date: Thu, 13 Mar 2008 06:21:33 +0000 Subject: [PATCH] --- ase/utl/stdio.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/ase/utl/stdio.c b/ase/utl/stdio.c index 825e9561..2466cd90 100644 --- a/ase/utl/stdio.c +++ b/ase/utl/stdio.c @@ -1,5 +1,5 @@ /* - * $Id: stdio.c 122 2008-03-12 11:55:39Z baconevi $ + * $Id: stdio.c 124 2008-03-12 12:21:33Z baconevi $ * * {License} */ @@ -398,6 +398,12 @@ ase_ssize_t ase_getdelim ( if (b == ASE_NULL) return -1; } + if (ase_feof(fp)) + { + len = (ase_size_t)-1; + goto exit_task; + } + while (1) { ase_cint_t c = ase_fgetc(fp); @@ -405,7 +411,7 @@ ase_ssize_t ase_getdelim ( { if (ase_ferror(fp)) { - len = (ase_size_t)-1; + len = (ase_size_t)-1; goto exit_task; }