about summary refs log tree commit diff
path: root/Src/math.c
diff options
context:
space:
mode:
authorMikael Magnusson <mikachu@gmail.com>2013-03-13 19:54:20 +0000
committerMikael Magnusson <mikachu@gmail.com>2013-03-13 19:54:20 +0000
commit1d3d92a0c9a5e10228b42ce3a62e8de354748051 (patch)
tree63ef59ac43de283fc0ac5e825dab7abfebeb9fc3 /Src/math.c
parentdcbeba98898463acc213b7b55fc09a74d6a2e60b (diff)
downloadzsh-1d3d92a0c9a5e10228b42ce3a62e8de354748051.tar.gz
zsh-1d3d92a0c9a5e10228b42ce3a62e8de354748051.tar.xz
zsh-1d3d92a0c9a5e10228b42ce3a62e8de354748051.zip
31140: avoid crash when hitting recursion limit
Diffstat (limited to 'Src/math.c')
-rw-r--r--Src/math.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/Src/math.c b/Src/math.c
index f8a4eefeb..a2462a32e 100644
--- a/Src/math.c
+++ b/Src/math.c
@@ -362,8 +362,9 @@ mathevall(char *s, enum prec_type prec_tp, char **ep)
     if (mlevel >= MAX_MLEVEL) {
 	xyyval.type = MN_INTEGER;
 	xyyval.u.l = 0;
+	*ep = s;
 
-	zerr("math recursion limit exceeded");
+	zerr("math recursion limit exceeded: %s", *ep);
 
 	return xyyval;
     }