aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/lscript/lscript_execute
diff options
context:
space:
mode:
Diffstat (limited to 'linden/indra/lscript/lscript_execute')
-rw-r--r--linden/indra/lscript/lscript_execute/lscript_execute.cpp11
-rw-r--r--linden/indra/lscript/lscript_execute/lscript_readlso.cpp6
2 files changed, 5 insertions, 12 deletions
diff --git a/linden/indra/lscript/lscript_execute/lscript_execute.cpp b/linden/indra/lscript/lscript_execute/lscript_execute.cpp
index cb9a78e..7da5e51 100644
--- a/linden/indra/lscript/lscript_execute/lscript_execute.cpp
+++ b/linden/indra/lscript/lscript_execute/lscript_execute.cpp
@@ -809,16 +809,7 @@ void LLScriptExecute::runInstructions(BOOL b_print, const LLUUID &id,
809 // is there a fault? 809 // is there a fault?
810 // if yes, print out message and exit 810 // if yes, print out message and exit
811 S32 value = getVersion(); 811 S32 value = getVersion();
812 S32 major_version = 0; 812 if ((value != LSL2_VERSION1_END_NUMBER) && (value != LSL2_VERSION_NUMBER))
813 if (value == LSL2_VERSION1_END_NUMBER)
814 {
815 major_version = 1;
816 }
817 else if (value == LSL2_VERSION_NUMBER)
818 {
819 major_version = 2;
820 }
821 else
822 { 813 {
823 setFault(LSRF_VERSION_MISMATCH); 814 setFault(LSRF_VERSION_MISMATCH);
824 } 815 }
diff --git a/linden/indra/lscript/lscript_execute/lscript_readlso.cpp b/linden/indra/lscript/lscript_execute/lscript_readlso.cpp
index 3b10cc6..05eb826 100644
--- a/linden/indra/lscript/lscript_execute/lscript_readlso.cpp
+++ b/linden/indra/lscript/lscript_execute/lscript_readlso.cpp
@@ -150,7 +150,9 @@ void LLScriptLSOParse::printGlobals(LLFILE *fp)
150 150
151 // get offset to skip past name 151 // get offset to skip past name
152 varoffset = global_v_offset; 152 varoffset = global_v_offset;
153 // FIXME: Not actually used, perhaps there's a skip function? Or perhaps we really do need to skip past a name as the above comment suggests?
153 offset = bytestream2integer(mRawData, global_v_offset); 154 offset = bytestream2integer(mRawData, global_v_offset);
155 offset = offset + 0;
154 156
155 // get typeexport 157 // get typeexport
156 type = *(mRawData + global_v_offset++); 158 type = *(mRawData + global_v_offset++);
@@ -268,8 +270,6 @@ void LLScriptLSOParse::printGlobalFunctions(LLFILE *fp)
268 fprintf(fp, "[Function #%d] [0x%X] %s\n", function_number, orig_function_offset, name); 270 fprintf(fp, "[Function #%d] [0x%X] %s\n", function_number, orig_function_offset, name);
269 fprintf(fp, "\tReturn Type: %s\n", LSCRIPTTypeNames[type]); 271 fprintf(fp, "\tReturn Type: %s\n", LSCRIPTTypeNames[type]);
270 type = *(mRawData + function_offset++); 272 type = *(mRawData + function_offset++);
271 S32 params;
272 params = 0;
273 S32 pcount = 0; 273 S32 pcount = 0;
274 while (type) 274 while (type)
275 { 275 {
@@ -362,7 +362,9 @@ void LLScriptLSOParse::printStates(LLFILE *fp)
362 if (event_handlers & LSCRIPTStateBitField[k]) 362 if (event_handlers & LSCRIPTStateBitField[k])
363 { 363 {
364 temp_end = bytestream2integer(mRawData, read_ahead); 364 temp_end = bytestream2integer(mRawData, read_ahead);
365 // FIXME onefang: Dummy is not actually used, but perhaps this is here to stop a warning? We need to stop another warning now. Some sort of skip might be better.
365 dummy = bytestream2integer(mRawData, read_ahead); 366 dummy = bytestream2integer(mRawData, read_ahead);
367 dummy = dummy + 0;
366 if ( (temp_end < opcode_end) 368 if ( (temp_end < opcode_end)
367 &&(temp_end > event_offset)) 369 &&(temp_end > event_offset))
368 { 370 {