aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMattias EngdegÄrd2022-08-30 11:20:42 +0200
committerMattias EngdegÄrd2022-08-30 11:26:40 +0200
commit8954fcb93bb271f5147b19671d1bf87d88d8047a (patch)
treea721c293d9c33c04d200a9048f5e398cefa54ffe /src
parent57ba65e047de2495500ba375070a896913cce267 (diff)
downloademacs-8954fcb93bb271f5147b19671d1bf87d88d8047a.tar.gz
emacs-8954fcb93bb271f5147b19671d1bf87d88d8047a.zip
; * src/lread.c (read0): Fix specpdl off-by-one bug in last change.
Diffstat (limited to 'src')
-rw-r--r--src/lread.c6
1 files 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)
3702 char *read_buffer = stackbuf; 3702 char *read_buffer = stackbuf;
3703 ptrdiff_t read_buffer_size = sizeof stackbuf; 3703 ptrdiff_t read_buffer_size = sizeof stackbuf;
3704 char *heapbuf = NULL; 3704 char *heapbuf = NULL;
3705 specpdl_ref count = SPECPDL_INDEX ();
3706 3705
3706 specpdl_ref base_pdl = SPECPDL_INDEX ();
3707 ptrdiff_t base_sp = rdstack.sp; 3707 ptrdiff_t base_sp = rdstack.sp;
3708 record_unwind_protect_intmax (read_stack_reset, base_sp); 3708 record_unwind_protect_intmax (read_stack_reset, base_sp);
3709 3709
3710 specpdl_ref count = SPECPDL_INDEX ();
3711
3710 bool uninterned_symbol; 3712 bool uninterned_symbol;
3711 bool skip_shorthand; 3713 bool skip_shorthand;
3712 3714
@@ -4354,7 +4356,7 @@ read0 (Lisp_Object readcharfun, bool locate_syms)
4354 } 4356 }
4355 } 4357 }
4356 4358
4357 return unbind_to (count, obj); 4359 return unbind_to (base_pdl, obj);
4358} 4360}
4359 4361
4360 4362