From 1780502da6b9ac8d3063dfd56f675318568283dc Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sat, 21 Jul 2018 00:25:27 -0700 Subject: [PATCH] Report base of out-of-range input fixnums * src/lread.c (string_to_number): Report the base of an out-of-range fixnum. Problem reported by Andy Moreton in: https://lists.gnu.org/r/emacs-devel/2018-07/msg00696.html --- src/lread.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/lread.c b/src/lread.c index 4eba8635521..50fc6ef8f3a 100644 --- a/src/lread.c +++ b/src/lread.c @@ -3798,10 +3798,11 @@ string_to_number (char const *string, int base, int flags) if (! (state & DOT_CHAR) && ! (flags & S2N_OVERFLOW_TO_FLOAT)) { - AUTO_STRING (fmt, ("%s is out of fixnum range; " + AUTO_STRING (fmt, ("%s (base %d) is out of fixnum range; " "maybe set `read-integer-overflow-as-float'?")); AUTO_STRING_WITH_LEN (arg, string, cp - string); - xsignal1 (Qoverflow_error, CALLN (Fformat_message, fmt, arg)); + xsignal1 (Qoverflow_error, + CALLN (Fformat_message, fmt, arg, make_number (base))); } } -- 2.39.2