From c61e18a044992c0a9bebae104375923e65fbf2bf Mon Sep 17 00:00:00 2001 From: ALEXks Date: Sun, 27 Jul 2025 08:20:36 +0300 Subject: [PATCH] fixed region inserter --- src/DvmhRegions/DvmhRegionInserter.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/DvmhRegions/DvmhRegionInserter.cpp b/src/DvmhRegions/DvmhRegionInserter.cpp index 71c872d..002f40b 100644 --- a/src/DvmhRegions/DvmhRegionInserter.cpp +++ b/src/DvmhRegions/DvmhRegionInserter.cpp @@ -1297,7 +1297,10 @@ static set { declStat = SgStatement::getStatementByFileAndLine(decl.first, decl.second); if (declStat == NULL) // check in inlcudes - { + { + if (!main->switchToFile()) + printInternalError(convertFileName(__FILE__).c_str(), __LINE__); + for (auto st = main; st != main->lastNodeOfStmt() && !declStat; st = st->lexNext()) { if (st->fileName() == decl.first && st->lineNumber() == decl.second)