From 89fe5dab825a62a0e3fd8d248cbc91c65eb2a426 Mon Sep 17 00:00:00 2001 From: Jacek Antonelli Date: Fri, 15 Aug 2008 23:44:50 -0500 Subject: Second Life viewer sources 1.14.0.0 --- .../lscript/lscript_compile/lscript_bytecode.cpp | 24 +++++++++++----------- 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'linden/indra/lscript/lscript_compile/lscript_bytecode.cpp') diff --git a/linden/indra/lscript/lscript_compile/lscript_bytecode.cpp b/linden/indra/lscript/lscript_compile/lscript_bytecode.cpp index 6d18a1a..b696cc6 100644 --- a/linden/indra/lscript/lscript_compile/lscript_bytecode.cpp +++ b/linden/indra/lscript/lscript_compile/lscript_bytecode.cpp @@ -78,7 +78,7 @@ void LLScriptByteCodeChunk::addByte(U8 byte) if (mCodeChunk) { U8 *temp = new U8[mCurrentOffset + 1]; - memcpy(temp, mCodeChunk, mCurrentOffset); + memcpy(temp, mCodeChunk, mCurrentOffset); /* Flawfinder: ignore */ delete [] mCodeChunk; mCodeChunk = temp; } @@ -102,7 +102,7 @@ void LLScriptByteCodeChunk::addBytes(U8 *bytes, S32 size) if (mCodeChunk) { U8 *temp = new U8[mCurrentOffset + size]; - memcpy(temp, mCodeChunk, mCurrentOffset); + memcpy(temp, mCodeChunk, mCurrentOffset); /* Flawfinder: ignore */ delete [] mCodeChunk; mCodeChunk = temp; } @@ -110,7 +110,7 @@ void LLScriptByteCodeChunk::addBytes(U8 *bytes, S32 size) { mCodeChunk = new U8[size]; } - memcpy(mCodeChunk + mCurrentOffset, bytes, size); + memcpy(mCodeChunk + mCurrentOffset, bytes, size);/* Flawfinder: ignore */ mCurrentOffset += size; } @@ -119,7 +119,7 @@ void LLScriptByteCodeChunk::addBytes(char *bytes, S32 size) if (mCodeChunk) { U8 *temp = new U8[mCurrentOffset + size]; - memcpy(temp, mCodeChunk, mCurrentOffset); + memcpy(temp, mCodeChunk, mCurrentOffset); /*Flawfinder: ignore*/ delete [] mCodeChunk; mCodeChunk = temp; } @@ -127,7 +127,7 @@ void LLScriptByteCodeChunk::addBytes(char *bytes, S32 size) { mCodeChunk = new U8[size]; } - memcpy(mCodeChunk + mCurrentOffset, bytes, size); + memcpy(mCodeChunk + mCurrentOffset, bytes, size); /*Flawfinder: ignore*/ mCurrentOffset += size; } @@ -136,7 +136,7 @@ void LLScriptByteCodeChunk::addBytes(S32 size) if (mCodeChunk) { U8 *temp = new U8[mCurrentOffset + size]; - memcpy(temp, mCodeChunk, mCurrentOffset); + memcpy(temp, mCodeChunk, mCurrentOffset); /*Flawfinder: ignore*/ delete [] mCodeChunk; mCodeChunk = temp; } @@ -153,7 +153,7 @@ void LLScriptByteCodeChunk::addBytesDontInc(S32 size) if (mCodeChunk) { U8 *temp = new U8[mCurrentOffset + size]; - memcpy(temp, mCodeChunk, mCurrentOffset); + memcpy(temp, mCodeChunk, mCurrentOffset); /*Flawfinder: ignore*/ delete [] mCodeChunk; mCodeChunk = temp; } @@ -256,7 +256,7 @@ void LLScriptScriptCodeChunk::build(FILE *efp, FILE *bcfp) mCompleteCode = new U8[mTotalSize]; memset(mCompleteCode, 0, mTotalSize); - memcpy(mCompleteCode, mRegisters->mCodeChunk, mRegisters->mCurrentOffset); + memcpy(mCompleteCode, mRegisters->mCodeChunk, mRegisters->mCurrentOffset); offset += mRegisters->mCurrentOffset; set_register(mCompleteCode, LREG_IP, 0); @@ -267,12 +267,12 @@ void LLScriptScriptCodeChunk::build(FILE *efp, FILE *bcfp) set_register(mCompleteCode, LREG_GVR, offset); - memcpy(mCompleteCode + offset, mGlobalVariables->mCodeChunk, mGlobalVariables->mCurrentOffset); + memcpy(mCompleteCode + offset, mGlobalVariables->mCodeChunk, mGlobalVariables->mCurrentOffset); /*Flawfinder: ignore*/ offset += mGlobalVariables->mCurrentOffset; set_register(mCompleteCode, LREG_GFR, offset); - memcpy(mCompleteCode + offset, mGlobalFunctions->mCodeChunk, mGlobalFunctions->mCurrentOffset); + memcpy(mCompleteCode + offset, mGlobalFunctions->mCodeChunk, mGlobalFunctions->mCurrentOffset); /*Flawfinder: ignore*/ offset += mGlobalFunctions->mCurrentOffset; set_register(mCompleteCode, LREG_SR, offset); @@ -291,12 +291,12 @@ void LLScriptScriptCodeChunk::build(FILE *efp, FILE *bcfp) } set_event_register(mCompleteCode, LREG_ER, bytestream2u64(mStates->mCodeChunk, default_state_offset), LSL2_CURRENT_MAJOR_VERSION); - memcpy(mCompleteCode + offset, mStates->mCodeChunk, mStates->mCurrentOffset); + memcpy(mCompleteCode + offset, mStates->mCodeChunk, mStates->mCurrentOffset); /*Flawfinder: ignore*/ offset += mStates->mCurrentOffset; set_register(mCompleteCode, LREG_HR, offset); - memcpy(mCompleteCode + offset, mHeap->mCodeChunk, mHeap->mCurrentOffset); + memcpy(mCompleteCode + offset, mHeap->mCodeChunk, mHeap->mCurrentOffset); /*Flawfinder: ignore*/ offset += mHeap->mCurrentOffset; set_register(mCompleteCode, LREG_HP, offset); -- cgit v1.1