Merge pull request #635 from just-bank/engine-fixes

Various engine fixes
This commit is contained in:
Thomas Fischer 2014-05-23 14:09:00 +02:00
commit cd978039ac
37 changed files with 106 additions and 86 deletions

View file

@ -403,14 +403,14 @@ bool CodeBlock::read(StringTableEntry fileName, Stream &st)
for(U32 i = 0; i < size; i++)
st.read(&functionFloats[i]);
}
U32 codeSize;
st.read(&codeSize);
U32 codeLength;
st.read(&codeLength);
st.read(&lineBreakPairCount);
U32 totSize = codeSize + lineBreakPairCount * 2;
U32 totSize = codeLength + lineBreakPairCount * 2;
code = new U32[totSize];
for(i = 0; i < codeSize; i++)
for(i = 0; i < codeLength; i++)
{
U8 b;
st.read(&b);
@ -420,10 +420,10 @@ bool CodeBlock::read(StringTableEntry fileName, Stream &st)
code[i] = b;
}
for(i = codeSize; i < totSize; i++)
for(i = codeLength; i < totSize; i++)
st.read(&code[i]);
lineBreakPairs = code + codeSize;
lineBreakPairs = code + codeLength;
// StringTable-ize our identifiers.
U32 identCount;

View file

@ -76,6 +76,7 @@
// Disable some VC warnings that are irrelevant to us.
#pragma warning( push )
#pragma warning( disable : 4510 ) // default constructor could not be generated; all the Args structures are never constructed by us
#pragma warning( disable : 4610 ) // can never be instantiated; again Args is never constructed by us
@ -2788,7 +2789,6 @@ struct _EngineConsoleCallbackHelper
// Re-enable some VC warnings we disabled for this file.
#pragma warning( default : 4510 )
#pragma warning( default : 4610 )
#pragma warning( pop ) // 4510 and 4610
#endif // !_ENGINEAPI_H_

View file

@ -127,7 +127,7 @@ public:
void breakProcess();
virtual void executionStopped(CodeBlock *code, U32 lineNumber);
void executionStopped(CodeBlock *code, U32 lineNumber);
void send(const char *s);
void setDebugParameters(S32 port, const char *password, bool waitForClient);
void processConsoleLine(const char *consoleLine);