From edf3a9155b765affcaec92c3b8b7e1c18196508d Mon Sep 17 00:00:00 2001 From: Rick Gibbed Date: Fri, 31 May 2013 20:55:52 -0700 Subject: [PATCH] The stack address needs to start at the end of the allocated memory for the stack, not the beginning. --- src/xenia/cpu/thread_state.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/xenia/cpu/thread_state.cc b/src/xenia/cpu/thread_state.cc index 17e2c3a01..1e99c922c 100644 --- a/src/xenia/cpu/thread_state.cc +++ b/src/xenia/cpu/thread_state.cc @@ -33,7 +33,7 @@ ThreadState::ThreadState( ppc_state_.thread_state = this; // Set initial registers. - ppc_state_.r[1] = stack_address_; + ppc_state_.r[1] = stack_address_ + stack_size; ppc_state_.r[13] = thread_state_address_; }