* ldlex.l (yy_input): Correct error check.

This commit is contained in:
Andreas Jaeger 2002-01-25 13:04:32 +00:00
parent 6d39955ebe
commit 1e84433f5c
2 changed files with 5 additions and 1 deletions

View File

@ -1,3 +1,7 @@
2002-01-25 Andreas Jaeger <aj@suse.de>
* ldlex.l (yy_input): Correct error check.
2002-01-25 Alan Modra <amodra@bigpond.net.au>
* ldmisc.c (demangle): Put back dots when string not demangled.

View File

@ -596,7 +596,7 @@ yy_input (buf, result, max_size)
if (yyin)
{
*result = fread ((char *) buf, 1, max_size, yyin);
if (*result < 0)
if (*result < max_size && ferror (yyin))
einfo ("%F%P: read in flex scanner failed\n");
}
}