aboutsummaryrefslogtreecommitdiffstats
path: root/mpfr.c
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2020-07-05 21:39:40 +0300
committerArnold D. Robbins <arnold@skeeve.com>2020-07-05 21:39:40 +0300
commit6f919b67d12616168c5e1bbfca509359fed9143d (patch)
tree77181c0a49684627ab769d2ea0f7844b191471f8 /mpfr.c
parent44a927ce8044c599510580adb55c6fa52ecc8052 (diff)
parent177df586e992824f80bf81a1b878c7a4076caedd (diff)
downloadegawk-6f919b67d12616168c5e1bbfca509359fed9143d.tar.gz
egawk-6f919b67d12616168c5e1bbfca509359fed9143d.tar.bz2
egawk-6f919b67d12616168c5e1bbfca509359fed9143d.zip
Merge branch 'gawk-5.1-stable'
Diffstat (limited to 'mpfr.c')
-rw-r--r--mpfr.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/mpfr.c b/mpfr.c
index e1712863..be2b81b5 100644
--- a/mpfr.c
+++ b/mpfr.c
@@ -293,6 +293,14 @@ force_mpnum(NODE *n, int do_nondec, int use_locale)
else
cp1 = cp;
+ /*
+ * Maybe "+" or "-" was the field. mpg_strtoui
+ * won't check for that and set errno, so we have
+ * to check manuall.
+ */
+ if (*cp1 == '\0')
+ return false;
+
if (do_nondec)
base = get_numbase(cp1, cpend - cp1, use_locale);