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:
parent
d5a835c3cf
commit
046cb195e9
|
@ -415,6 +415,12 @@ bool ExpEvaluator::getString(ParsePoint& expr)
|
||||||
String str;
|
String str;
|
||||||
if (getString(expr,str)) {
|
if (getString(expr,str)) {
|
||||||
addOpcode(str);
|
addOpcode(str);
|
||||||
|
int pos = -1;
|
||||||
|
while (true) {
|
||||||
|
if ((pos = str.find('\n',pos + 1)) < 0)
|
||||||
|
break;
|
||||||
|
expr.m_lineNo = ++m_lineNo;
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue