Fixed Expressions error message for multi-line expressions.

This commit is contained in:
Matthias Koefferlein 2021-03-12 23:18:23 +01:00
parent f2d106651b
commit fd01328659
1 changed files with 2 additions and 2 deletions

View File

@ -104,7 +104,7 @@ ExpressionParserContext::where () const
int line = 1;
size_t col = 0;
for (size_t p = 0; p < len; ++p, ++col) {
for (size_t p = 0; p < pos; ++p) {
if (text [p] == '\n') {
++line;
col = 1;
@ -2044,7 +2044,7 @@ public:
throw EvalError (tl::sprintf (tl::to_string (tr ("Not a valid object for a method call (not an object) - value is %s")), v->to_parsable_string ()), m_context);
}
} else {
throw EvalError (tl::sprintf (tl::to_string (tr ("Not a valid object for a method call (wrong type) - value is %1")), v->to_parsable_string ()), m_context);
throw EvalError (tl::sprintf (tl::to_string (tr ("Not a valid object for a method call (wrong type) - value is %s")), v->to_parsable_string ()), m_context);
}
tl::Variant o;