Skip to content
Snippets Groups Projects
Commit b5a18c27 authored by mattijs's avatar mattijs
Browse files

BUG: ISstream: only check character if reading succeeded

parent 65062e35
Branches
Tags
1 merge request!6Feature parallel
......@@ -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_++;
}
......
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