Advertisement

CScriptBuilder bug

Started by September 26, 2012 08:43 AM
4 comments, last by WitchLord 12 years, 1 month ago
Hi smile.png

if defined AS_PROCESS_METADATA - CScriptBuilder crash on this script code:

std::string script = "class ";
Thanks. I'll look into this

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

Advertisement
I couldn't reproduce the crash. But I made some code changes in revision 1427 that I think may have caused the crash for you.

Let me know if the problem still persists.

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

I use revision 1427

you can see imgae

pos == 6

http://gyazo.com/da7...e4987b7166d540b

std::string scirt_text = "class ";
builder.AddSectionFromMemory( scirt_text.c_str() , "test" );
builder.BuildModule();
What compiler are you using?

I can only imagine the crash is due to the modifiedScript[pos] accessing one byte beyond the size of the string. Still, the code is only reading from this position, so it shouldn't crash.

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

I've made another change in revision 1428, so now the modifiedScript[pos] won't be called when the position is already beyond the size of the script.

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

This topic is closed to new replies.

Advertisement