From: Mattias EngdegÄrd Date: Tue, 30 Aug 2022 09:20:42 +0000 (+0200) Subject: ; * src/lread.c (read0): Fix specpdl off-by-one bug in last change. X-Git-Tag: emacs-29.0.90~1856^2~832 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=8954fcb93bb271f5147b19671d1bf87d88d8047a;p=emacs.git ; * src/lread.c (read0): Fix specpdl off-by-one bug in last change. --- 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); }