summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/math.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/math.c b/lib/math.c
index a4731edb9a..2e53b09e6c 100644
--- a/lib/math.c
+++ b/lib/math.c
@@ -546,8 +546,8 @@ static arith_t evaluate_string(arith_state_t *math_state, const char *expr)
arith_t result;
if (numstack == NULL || stack == NULL) {
- errmsg = "out of memory";
- goto err_with_custom_msg;
+ math_state->errmsg = "out of memory";
+ return -1;
}
/* Start with a left paren */