From 0af044c4bb99c9fb63e4950b5c0593714d0e7619 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Fri, 11 Sep 2009 19:17:46 +0200 Subject: [PATCH] Fix two bad bugs in thread.c. --- src/thread.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/thread.c b/src/thread.c index 2f47c7e1037..d19172dcbe5 100644 --- a/src/thread.c +++ b/src/thread.c @@ -205,13 +205,13 @@ When the function exits, the thread dies. */) new_thread = (struct thread_state *) allocate_pseudovector (VECSIZE (struct thread_state), 2, PVEC_THREAD); - memset (new_thread, OFFSETOF (struct thread_state, - m_gcprolist), - sizeof (struct thread_state) - OFFSETOF (struct thread_state, - m_gcprolist)); + memset ((char *) new_thread + OFFSETOF (struct thread_state, m_gcprolist), + 0, sizeof (struct thread_state) - OFFSETOF (struct thread_state, + m_gcprolist)); new_thread->func = function; new_thread->initial_specpdl = Qnil; + new_thread->m_current_buffer = current_thread->m_current_buffer; for (p = specpdl; p != specpdl_ptr; ++p) { -- 2.11.4.GIT