mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
BUG: ISstream: only check character if reading succeeded
This commit is contained in:
@ -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_++;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user