mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
BUG: readOBJ: handling empty lines
This commit is contained in:
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -51,9 +51,11 @@ bool Foam::triSurface::readOBJ(const fileName& OBJfileName)
|
|||||||
{
|
{
|
||||||
string line = getLineNoComment(OBJfile);
|
string line = getLineNoComment(OBJfile);
|
||||||
|
|
||||||
if (line[line.size()-1] == '\\')
|
label sz = line.size();
|
||||||
|
|
||||||
|
if (sz && line[sz-1] == '\\')
|
||||||
{
|
{
|
||||||
line.substr(0, line.size()-1);
|
line.substr(0, sz-1);
|
||||||
line += getLineNoComment(OBJfile);
|
line += getLineNoComment(OBJfile);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user