🎉 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!

how to use properly GetMethodIdByXXX ?

Started by
11 comments, last by kunitoki 18 years, 2 months ago
Seems to be a buffer overflow within the library. I'm glad you managed to narrow the problem down to this, as it would have been very difficult to find otherwise.

I'll make some tests and fix whatever bug I find. I'll let you know as soon as it's done.

Regards,
Andreas

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 found the problem. I had forgotten to add parenthesis around a ?: operator. This caused the stackFramePointer to be invalid, which in turn caused the buffer overflow in the SetArgDWord() methods.

Line 286 in file as_context.cpp, function Prepare(), should be:

argumentsSize = currentFunction->GetSpaceNeededForArguments() + (currentFunction->objectType ? PTR_SIZE : 0);


Thanks for helping me with this bug. [smile]

I'm updating the SVN on SourceForge.net right now.

Regards,
Andreas

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

nice ;)
very happy and proud to help you making angelscript the perfect tool...

This topic is closed to new replies.

Advertisement