fix index error when process string substitution

This commit is contained in:
benstone 2021-06-28 21:38:29 +08:00
parent 2554aced98
commit 23dd97beea

View File

@ -312,8 +312,9 @@ public class TestSession extends LogSupport {
buf.append(getVal(key, payload));
}
n = s.indexOf("${", a);
a++;
if (n < 0) {
buf.append(s.substring(a + 1));
buf.append(s.substring(a));
return buf.toString();
}
z = n;