diff --git a/src/macro_expansion.cc b/src/macro_expansion.cc index 84ba18e8..b0de34cf 100644 --- a/src/macro_expansion.cc +++ b/src/macro_expansion.cc @@ -34,9 +34,15 @@ std::string MacroExpansion::expandKeepOriginal(const std::string& input, std::string MacroExpansion::expand(const std::string& input, Assay *assay) { - std::string res(input); + std::string res; + size_t pos = input.find("%{"); + + if (pos != std::string::npos) { + res = input; + } else { + return input; + } - size_t pos = res.find("%{"); while (pos != std::string::npos) { size_t start = pos; size_t end = res.find("}");