From: Daniel Arndt Date: Mon, 23 Apr 2018 14:05:21 +0000 (+0200) Subject: Use correct type in GridIn::skip_comment_lines X-Git-Tag: v9.0.0-rc1~114^2~5 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fb4b39c6e0e8088a09e7f1205e95d0c9e9e74b80;p=dealii.git Use correct type in GridIn::skip_comment_lines --- diff --git a/source/grid/grid_in.cc b/source/grid/grid_in.cc index b1f8029137..e5b389b91e 100644 --- a/source/grid/grid_in.cc +++ b/source/grid/grid_in.cc @@ -2738,7 +2738,7 @@ void GridIn::skip_comment_lines (std::istream &in, char c; // loop over the following comment // lines - while ((c=in.get()) == comment_start) + while (in.get(c) && c == comment_start) // loop over the characters after // the comment starter while (in.get() != '\n') @@ -2747,7 +2747,8 @@ void GridIn::skip_comment_lines (std::istream &in, // put back first character of // first non-comment line - in.putback (c); + if (in) + in.putback (c); // at last: skip additional empty lines, if present skip_empty_lines(in);