diff --git a/sapfor/experts/Sapfor_2017/_src/Transformations/checkpoints.cpp b/sapfor/experts/Sapfor_2017/_src/Transformations/checkpoints.cpp index 67d96a1..0ccf36e 100644 --- a/sapfor/experts/Sapfor_2017/_src/Transformations/checkpoints.cpp +++ b/sapfor/experts/Sapfor_2017/_src/Transformations/checkpoints.cpp @@ -825,7 +825,7 @@ void createCheckpoints(SgFile* file, const map& commonBloc { func = file->functions(z); point = func->lexNext(); - while (point && point->lineNumber() < cpLine && point != func->lastNodeOfStmt() && point->variant() != CONTAINS_STMT) + while (point && ((point->fileName() != file->filename()) || (point->lineNumber() < cpLine)) && point != func->lastNodeOfStmt() && point->variant() != CONTAINS_STMT) point = point->lexNext(); //cp place was found