From: dpasukhi Date: Fri, 5 Feb 2021 10:05:22 +0000 (+0300) Subject: 0032115: Data Exchange, STEP reader - Incorrect full path to file is not caught X-Git-Tag: V7_6_0_beta~275 X-Git-Url: http://git.dev.opencascade.org/gitweb/?a=commitdiff_plain;h=refs%2Fheads%2FIR-2021-02-05;p=occt.git 0032115: Data Exchange, STEP reader - Incorrect full path to file is not caught Fixed a checking for a non-existent step file --- diff --git a/src/StepFile/StepFile_Read.cxx b/src/StepFile/StepFile_Read.cxx index 06068319b2..b2e2a877b7 100644 --- a/src/StepFile/StepFile_Read.cxx +++ b/src/StepFile/StepFile_Read.cxx @@ -80,7 +80,7 @@ static Standard_Integer StepFile_Read (const char* theName, aStreamPtr = &aFileStream; } - if (aStreamPtr->bad()) + if (aStreamPtr->fail()) { return -1; } @@ -166,7 +166,7 @@ static Standard_Integer StepFile_Read (const char* theName, sout << " ... Parameters prepared ...\n"; #ifdef CHRONOMESURE - c.Show(sout) + c.Show(sout); #endif readtool.LoadModel(theStepModel);