diff options
author | Vadim Savchuk <vsavchuk@productengine.com> | 2010-02-15 13:46:49 +0200 |
---|---|---|
committer | Vadim Savchuk <vsavchuk@productengine.com> | 2010-02-15 13:46:49 +0200 |
commit | 8ba5e0155ff0cbc2355ac4daf468d291fae84afa (patch) | |
tree | 74c8e9a6f9ae76f3fd3414fde4d74f6a824aad0a /indra/lscript/lscript_compile/lscript_tree.cpp | |
parent | 75a060497c06d0143a0515f4d5665097da34a3e3 (diff) | |
parent | 9fee359d1baf6e0046655cb8e4afabb8774754b1 (diff) |
Merge from default branch
--HG--
branch : product-engine
Diffstat (limited to 'indra/lscript/lscript_compile/lscript_tree.cpp')
-rw-r--r-- | indra/lscript/lscript_compile/lscript_tree.cpp | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/indra/lscript/lscript_compile/lscript_tree.cpp b/indra/lscript/lscript_compile/lscript_tree.cpp index 3b8bbbe805..3d19de193a 100644 --- a/indra/lscript/lscript_compile/lscript_tree.cpp +++ b/indra/lscript/lscript_compile/lscript_tree.cpp @@ -9805,6 +9805,9 @@ void LLScriptEventHandler::recurse(LLFILE *fp, S32 tabs, S32 tabsize, LSCRIPTCom break; case LSCP_EMIT_BYTE_CODE: { + llassert(mEventp); + if (!mEventp) return; + // order for event handler // set jump table value S32 jumpoffset; @@ -9818,13 +9821,11 @@ void LLScriptEventHandler::recurse(LLFILE *fp, S32 tabs, S32 tabsize, LSCRIPTCom chunk->addBytes(4); // null terminated event name and null terminated parameters - if (mEventp) - { - LLScriptByteCodeChunk *event = new LLScriptByteCodeChunk(FALSE); - mEventp->recurse(fp, tabs, tabsize, pass, ptype, prunearg, scope, type, basetype, count, event, heap, stacksize, entry, entrycount, NULL); - chunk->addBytes(event->mCodeChunk, event->mCurrentOffset); - delete event; - } + LLScriptByteCodeChunk *event = new LLScriptByteCodeChunk(FALSE); + mEventp->recurse(fp, tabs, tabsize, pass, ptype, prunearg, scope, type, basetype, count, event, heap, stacksize, entry, entrycount, NULL); + chunk->addBytes(event->mCodeChunk, event->mCurrentOffset); + delete event; + chunk->addBytes(1); // now we're at the first opcode @@ -10626,6 +10627,8 @@ LLScriptScript::LLScriptScript(LLScritpGlobalStorage *globals, } temp = temp->mNextp; } + + mClassName[0] = '\0'; } void LLScriptScript::setBytecodeDest(const char* dst_filename) |