Jump to content

View more

Image of the Day

Boxes as reward for our ranking mode. ヾ(☆▽☆)
#indiedev #gamedev #gameart #screenshotsaturday https://t.co/ALF1InmM7K
IOTD | Top Screenshots

The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.


Sign up now
- - - - -

CScriptBuilder bug

4: Adsense

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.


  • You cannot reply to this topic
5 replies to this topic

#1 FDsagizi   Members   

514
Like
1Likes
Like

Posted 26 September 2012 - 02:43 AM

Hi Posted Image

if defined AS_PROCESS_METADATA - CScriptBuilder crash on this script code:

std::string script = "class ";

Edited by Andreas Jonsson, 06 October 2012 - 06:09 PM.


#2 Andreas Jonsson   Moderators   

4624
Like
0Likes
Like

Posted 03 October 2012 - 07:16 PM

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

#3 Andreas Jonsson   Moderators   

4624
Like
0Likes
Like

Posted 06 October 2012 - 06:09 PM

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

#4 FDsagizi   Members   

514
Like
0Likes
Like

Posted 07 October 2012 - 12:42 AM

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();

Edited by FDsagizi, 07 October 2012 - 12:44 AM.


#5 Andreas Jonsson   Moderators   

4624
Like
0Likes
Like

Posted 07 October 2012 - 09:44 AM

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

#6 Andreas Jonsson   Moderators   

4624
Like
0Likes
Like

Posted 07 October 2012 - 11:30 AM

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




Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.