From: Barry O'Reilly Date: Sat, 19 Oct 2013 18:42:38 +0000 (-0400) Subject: * src/eval.c (unbind_for_thread_switch): Fix iteration over the X-Git-Tag: emacs-26.0.90~1144^2~17^2~3 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=6a3121904d76e3b2f63007341d48c5c1af55de80;p=emacs.git * src/eval.c (unbind_for_thread_switch): Fix iteration over the specpdl stack. --- diff --git a/src/ChangeLog b/src/ChangeLog index 705b9c771df..b6ecd5f60ba 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2013-10-19 Barry O'Reilly + + * eval.c (unbind_for_thread_switch): Fix iteration over the + specpdl stack. + 2013-09-01 Eli Zaretskii * eval.c (unbind_for_thread_switch): Accept a 'struct diff --git a/src/eval.c b/src/eval.c index b8a61590387..fc16c15e626 100644 --- a/src/eval.c +++ b/src/eval.c @@ -3488,9 +3488,9 @@ unbind_for_thread_switch (struct thread_state *thr) { union specbinding *bind; - for (bind = thr->m_specpdl_ptr; bind != thr->m_specpdl; --bind) + for (bind = thr->m_specpdl_ptr; bind > thr->m_specpdl;) { - if (bind->kind >= SPECPDL_LET) + if ((--bind)->kind >= SPECPDL_LET) { bind->let.saved_value = find_symbol_value (specpdl_symbol (bind)); do_one_unbind (bind, 0);