Commit afcd545a authored by mattijs's avatar mattijs
Browse files

BUG: ISstream: only check character if reading succeeded

parent ffbc93b9
......@@ -2,8 +2,8 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\/ M anipulation |
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
......@@ -59,7 +59,7 @@ inline Foam::ISstream& Foam::ISstream::get(char& c)
is_.get(c);
setState(is_.rdstate());
if (c == '\n')
if (good() && c == '\n')
{
lineNumber_++;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment