Fixed a bug where natives were not rebound on debug toggle
--HG-- extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%40699
This commit is contained in:
parent
3f25c99653
commit
f335c318bf
@ -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; i<nativeCount; i++)
|
||||
{
|
||||
new_ctx->natives[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);
|
||||
|
Loading…
Reference in New Issue
Block a user