Skip to content

Commit

Permalink
Update exaudfclient/base/javacontainer/script_options/parser_ctpg_scr…
Browse files Browse the repository at this point in the history
…ipt_importer.cc

Co-authored-by: Torsten Kilias <[email protected]>
  • Loading branch information
tomuben and tkilias authored Oct 15, 2024
1 parent d69208b commit f09a77d
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ void ScriptImporter::importScript(std::string & scriptCode,
ReplacedScripts replacedScript = {.script = std::move(importScriptCodeStr), .origPos = option.idx_in_source, .origLen = option.size };
replacedScripts.push_back(std::move(replacedScript));
}
//No replace the imported script bodies from end to start. Doing it in forward order would invalidate the offsets of later import scripts.
//Now replace the imported script bodies from end to start. Doing it in forward order would invalidate the offsets of later import scripts.
for (auto optionIt = replacedScripts.rbegin(); optionIt != replacedScripts.rend(); optionIt++) {
scriptCode.replace(optionIt->origPos, optionIt->origLen, optionIt->script);
}
Expand Down

0 comments on commit f09a77d

Please sign in to comment.