Jump to content

  • Log In with Google      Sign In   
  • Create Account


- - - - -

gvar-index bug


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
1 reply to this topic

#1 Lioirc   Members   -  Reputation: 142

Like
0Likes
Like

Posted 11 November 2004 - 09:47 AM

Hi in as_builder as_builder::RegisterGlobalVar() { ........ it should be gvar->index = mod->AllocGlobalMem(.....) ; instead of: gvar->index = mod->moduleID | mod->AllocGlobalMem(.....) ; } because there is no global mem, but a mem per module, so why store the module id in the index? this causes a bug when requesting the variable pointer (with multiple modules, i.e modID == 0x0001, then the first mod->gvar index == 0x00010001) because its returned like this: *pointer = (void*) (mod->globalMemAddressOf() + mod->globals[id]->index); if its needed to have the module id in the index of the gvar (but why?), then in scriptengine::GetGlobalVarPtr it should be: *pointer = (void*) (mod->globalMemAddressOf() + (mod->globals[id]->index & 0xFFFF)); but in this case, (mod->globals[id]->index) & 0xFFFF) == id, so it can be: *pointer = (void*) (mod->globalMemAddressOf() + id); Remeber that this is for 1.8.2b1 Best Regards, Lioric

Sponsor:

#2 Andreas Jonsson   Moderators   -  Reputation: 3261

Like
0Likes
Like

Posted 12 November 2004 - 02:12 AM

Yeah, the modules that were implemented in version 1.8.0 unfortunately introduced a lot of bugs like this one. However, I believe most of those bugs have been eliminated already. Especially this one was removed a long time ago.

Thanks anyway.


AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS