summaryrefslogtreecommitdiff
path: root/src/typval.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/typval.c')
-rw-r--r--src/typval.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/typval.c b/src/typval.c
index c859122ee..fb945cb13 100644
--- a/src/typval.c
+++ b/src/typval.c
@@ -1822,7 +1822,8 @@ eval_number(
: STR2NR_ALL, &n, NULL, 0, TRUE);
if (len == 0)
{
- semsg(_(e_invalid_expression_str), *arg);
+ if (evaluate)
+ semsg(_(e_invalid_expression_str), *arg);
return FAIL;
}
*arg += len;