Browse Source

Add Null init for pointers.

woollybah 11 years ago
parent
commit
19628fb615
1 changed files with 8 additions and 0 deletions
  1. 8 0
      ctranslator.bmx

+ 8 - 0
ctranslator.bmx

@@ -2311,6 +2311,14 @@ End Rem
 				End If
 			End If
 		End If
+		
+		If TPointerType(expr.exprType) Then
+			If TCastExpr(expr) Then
+				If TNullExpr(TCastExpr(expr).expr) Then
+					Return "0"
+				End If
+			End If
+		End If
 
 		'If TObjectType(expr.exprType) And TNullDecl(TObjectType(expr.exprType).classDecl) Then
 		'	Return Enquote("bbNullObject")