ソースを参照

scan istream on Irix without crashing

David Rose 21 年 前
コミット
e13d8f7518
1 ファイル変更1 行追加1 行削除
  1. 1 1
      dtool/src/prc/configPage.cxx

+ 1 - 1
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..