From f335c318bfa5c785da14af68c5d0d941b18fb50d Mon Sep 17 00:00:00 2001 From: David Anderson Date: Fri, 13 Apr 2007 17:18:41 +0000 Subject: [PATCH] Fixed a bug where natives were not rebound on debug toggle --HG-- extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%40699 --- core/systems/PluginSys.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/core/systems/PluginSys.cpp b/core/systems/PluginSys.cpp index fd67bb5d..0c0886c1 100644 --- a/core/systems/PluginSys.cpp +++ b/core/systems/PluginSys.cpp @@ -486,6 +486,13 @@ bool CPlugin::ToggleDebugMode(bool debug, char *error, size_t maxlength) new_ctx->context = m_ctx.ctx->context; memcpy(new_ctx->user, m_ctx.ctx->user, sizeof(m_ctx.ctx->user)); + uint32_t nativeCount = m_plugin->info.natives_num; + for (uint32_t i=0; inatives[i].pfn = m_ctx.ctx->natives[i].pfn; + new_ctx->natives[i].status = m_ctx.ctx->natives[i].status; + } + g_pVM->FreeContext(m_ctx.ctx); m_ctx.ctx = new_ctx; m_ctx.base->SetContext(new_ctx);