From f57e53412af85b98eff424175be800ceb517cc0a Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Fri, 25 Jan 2002 13:04:32 +0000 Subject: * ldlex.l (yy_input): Correct error check. --- ld/ldlex.l | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ld/ldlex.l') diff --git a/ld/ldlex.l b/ld/ldlex.l index 9f127f96d5..0b15ca2fab 100644 --- a/ld/ldlex.l +++ b/ld/ldlex.l @@ -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"); } } -- cgit v1.2.1