Advertisement

bug?

Started by November 10, 2008 01:19 AM
1 comment, last by WitchLord 16 years ago
Hi,

print(_String("abc")[0]);
or

print("abc"[0]);
failed to print correct char. but if you do this

_String a = "abc"; print(a[0]);
It will print correctly. The string is just contains a list of char. The index operator defines as:

	nRet = (asERetCodes) pScriptEngine->RegisterObjectBehaviour("_String", asBEHAVE_INDEX , "int8 &f(int)", asMETHODPR(_String, operator[], (int), char &), asCALL_THISCALL); 
	assert( nRet >= 0 );
I'll look into this. Thanks.

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've checked in the fix for this problem. Thanks for the help.

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