Fix macro expansion string replacement

It was removing more characters from the string than the actual %{variable}%
This commit is contained in:
Felipe Zimmerle 2015-09-02 22:56:15 -03:00
parent 45d81e1c04
commit 3de845fac1

View File

@ -42,7 +42,7 @@ std::string MacroExpansion::expand(const std::string& input, Assay *assay) {
variableValue = assay->resolve_variable_first(col, var);
}
res.erase(start, end + 2);
res.erase(start, end - start + 2);
if (variableValue != NULL) {
res.insert(start, *variableValue);
}