From e13d8f75185bf3fa20ca92e395676bded6fc118b Mon Sep 17 00:00:00 2001 From: David Rose Date: Wed, 1 Dec 2004 21:45:04 +0000 Subject: [PATCH] scan istream on Irix without crashing --- dtool/src/prc/configPage.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dtool/src/prc/configPage.cxx b/dtool/src/prc/configPage.cxx index 1059f2ea46..47bc2351d8 100644 --- a/dtool/src/prc/configPage.cxx +++ b/dtool/src/prc/configPage.cxx @@ -148,7 +148,7 @@ read_prc(istream &in) { in.read(buffer, buffer_size); size_t count = in.gcount(); - while (count != 0) { + while (count != 0 && !in.fail() && !in.eof()) { char *buffer_end = buffer + count; // Look for the first line in the buffer..