Browse Source

Official fix for the void assert from AngelScript SVN.

Lasse Öörni 12 years ago
parent
commit
6133c24a53
1 changed files with 1 additions and 2 deletions
  1. 1 2
      Source/ThirdParty/AngelScript/source/as_compiler.cpp

+ 1 - 2
Source/ThirdParty/AngelScript/source/as_compiler.cpp

@@ -8148,8 +8148,7 @@ void asCCompiler::CompileConversion(asCScriptNode *node, asSExprContext *ctx)
 	// here we'll only treat those conversions that require an explicit cast.
 	// here we'll only treat those conversions that require an explicit cast.
 
 
 	bool conversionOK = false;
 	bool conversionOK = false;
-	// Urho3D: check for void before attempting to compile the cast
-	if( !expr.type.isConstant && expr.type.dataType.GetTokenType() != ttVoid )
+	if( !expr.type.isConstant && expr.type.dataType != asCDataType::CreatePrimitive(ttVoid, false) )
 	{
 	{
 		if( !expr.type.dataType.IsObject() )
 		if( !expr.type.dataType.IsObject() )
 			ConvertToTempVariable(&expr);
 			ConvertToTempVariable(&expr);