From b051f32ab610e4749e66aef5d2ad70bc66c13654 Mon Sep 17 00:00:00 2001 From: Borja Ferrer Date: Thu, 3 Aug 2006 23:42:50 +0000 Subject: [PATCH] =?UTF-8?q?mo=C3=96=C3=B6re=20stuff?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --HG-- extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%4056 --- sourcepawn/vm/sp_vm.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/sourcepawn/vm/sp_vm.c b/sourcepawn/vm/sp_vm.c index b795ed061..b1ec091ca 100644 --- a/sourcepawn/vm/sp_vm.c +++ b/sourcepawn/vm/sp_vm.c @@ -258,7 +258,7 @@ int SP_BindNatives(sp_context_t *ctx, sp_nativeinfo_t *natives, unsigned int num for (i=0; inatives[i].status == SP_NATIVE_OKAY && !overwrite) + if ((ctx->natives[i].status == SP_NATIVE_OKAY) && !overwrite) continue; for (j=0; (natives[j].name) && (!num || j= ctx->hp) && (local_addr < ctx->sp)) || (local_addr < 0) || ((ucell_t)local_addr >= ctx->memory)) + return SP_ERR_INVALID_ADDRESS; + + if (phys_addr) + *phys_addr = (cell_t *)(ctx->data + local_addr); + return SP_ERR_NONE; } \ No newline at end of file