🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Bug in AS_DEBUG output

Started by
2 comments, last by Alexander Orefkov 2 years, 8 months ago

When I try using AS_DEBUG on Win x64 version, it crashes on some my scripts.

I was found, that crash caused in as_bytecode.cpp in DebugOutput, on lines

asCScriptFunction *f = engine->scriptFunctions[instr->wArg[0]];

instr->wArg[0] is short, and become negative on big functions number, and converting it to asUINT index created big number out of bound array. In my case function number was 0x81d8. Replacing line by

asCScriptFunction *f = engine->scriptFunctions[(unsigned short)instr->wArg[0]];

is solved problem.

Advertisement

Wow, you have a very big script application to reach function number 33240. I'll probably need to start thinking about supporting 32bit numbers for function ids.

But, until then I'll definitely add the fix you identified.

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

It is Urho3D game engine. Recently in it was created autogenerator of AngelScript bindings for it object model, and function count was doubled ?

For example, last auto-header for IDE autocomplete - https://raw.githubusercontent.com/urho3d/Urho3D/master/Docs/AngelScriptAPI.h

This topic is closed to new replies.

Advertisement