From dcb8176d90850f0d0b7d307ffbae40deb7f1162a Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Wed, 24 Apr 2019 17:58:27 -0400 Subject: [PATCH] Corrects potential failure properly to set stack pointer state. --- Processors/68000/Implementation/68000Implementation.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Processors/68000/Implementation/68000Implementation.hpp b/Processors/68000/Implementation/68000Implementation.hpp index 9f6f5e95d..e1d646518 100644 --- a/Processors/68000/Implementation/68000Implementation.hpp +++ b/Processors/68000/Implementation/68000Implementation.hpp @@ -1483,11 +1483,11 @@ template ProcessorSt template void Processor::set_state(const ProcessorState &state) { memcpy(data_, state.data, sizeof(state.data)); memcpy(address_, state.address, sizeof(state.address)); - stack_pointers_[0].full = state.user_stack_pointer; - stack_pointers_[1].full = state.supervisor_stack_pointer; set_status(state.status); + stack_pointers_[0].full = state.user_stack_pointer; + stack_pointers_[1].full = state.supervisor_stack_pointer; address_[7] = stack_pointers_[is_supervisor_]; }