From 8954fcb93bb271f5147b19671d1bf87d88d8047a Mon Sep 17 00:00:00 2001 From: =?utf8?q?Mattias=20Engdeg=C3=A5rd?= Date: Tue, 30 Aug 2022 11:20:42 +0200 Subject: [PATCH] ; * src/lread.c (read0): Fix specpdl off-by-one bug in last change. --- src/lread.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/lread.c b/src/lread.c index 15bbf46f78f..bb376064811 100644 --- a/src/lread.c +++ b/src/lread.c @@ -3702,11 +3702,13 @@ read0 (Lisp_Object readcharfun, bool locate_syms) char *read_buffer = stackbuf; ptrdiff_t read_buffer_size = sizeof stackbuf; char *heapbuf = NULL; - specpdl_ref count = SPECPDL_INDEX (); + specpdl_ref base_pdl = SPECPDL_INDEX (); ptrdiff_t base_sp = rdstack.sp; record_unwind_protect_intmax (read_stack_reset, base_sp); + specpdl_ref count = SPECPDL_INDEX (); + bool uninterned_symbol; bool skip_shorthand; @@ -4354,7 +4356,7 @@ read0 (Lisp_Object readcharfun, bool locate_syms) } } - return unbind_to (count, obj); + return unbind_to (base_pdl, obj); } -- 2.39.2