From 528867035383b29a901b6d6f13052abe8071b158 Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Thu, 9 Jul 2020 19:01:25 +0300 Subject: Fix indirect call tests for MPFR. --- ChangeLog | 5 +++++ awkgram.y | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index d0b5bd3a..1ce225be 100644 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,11 @@ * debug.c (do_eval): Preserve DO_MPFR flag in do_flags before parsing the string to be evaluated. + Fix indirect call tests for MPFR: + + * awkgram.y (lookup_builtin): Only return the MPFR builtin + function if the pointer is not NULL. + 2020-07-08 Arnold D. Robbins * str_array.c (str_lookup): If a pure number, copy to a string. Fixes diff --git a/awkgram.y b/awkgram.y index ec917c3b..f78fe470 100644 --- a/awkgram.y +++ b/awkgram.y @@ -6476,7 +6476,7 @@ lookup_builtin(const char *name) return (builtin_func_t) do_sub; #ifdef HAVE_MPFR - if (do_mpfr) + if (do_mpfr && tokentab[mid].ptr2 != NULL) return tokentab[mid].ptr2; #endif -- cgit v1.2.3