Fix code line counting when parsing multi-line string.

git-svn-id: http://voip.null.ro/svn/yate@6444 acf43c95-373e-0410-b603-e72c3f656dc1
This commit is contained in:
oana 2020-10-23 08:11:53 +00:00
parent d5a835c3cf
commit 046cb195e9
1 changed files with 6 additions and 0 deletions

View File

@ -415,6 +415,12 @@ bool ExpEvaluator::getString(ParsePoint& expr)
String str;
if (getString(expr,str)) {
addOpcode(str);
int pos = -1;
while (true) {
if ((pos = str.find('\n',pos + 1)) < 0)
break;
expr.m_lineNo = ++m_lineNo;
}
return true;
}
}