Explorar o código

Add Null init for pointers.

woollybah %!s(int64=11) %!d(string=hai) anos
pai
achega
19628fb615
Modificáronse 1 ficheiros con 8 adicións e 0 borrados
  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")