Browse Source

Fixed function munging for new struct expression. Fixes #512.

Brucey 5 years ago
parent
commit
b733245057
1 changed files with 5 additions and 1 deletions
  1. 5 1
      ctranslator.bmx

+ 5 - 1
ctranslator.bmx

@@ -1163,7 +1163,11 @@ t:+"NULLNULLNULL"
 					If cdecl.IsStruct() Then
 					If cdecl.IsStruct() Then
 						' create a local variable of the inner invocation
 						' create a local variable of the inner invocation
 						Local lvar:String = CreateLocal(lhs)
 						Local lvar:String = CreateLocal(lhs)
-						Return "_" + decl.munged+TransArgs( args,decl, "&" + lvar )
+						Local t:String
+						If decl.IsMethod() Then
+							t = "_"
+						End If
+						Return t + decl.munged+TransArgs( args,decl, "&" + lvar )
 					Else
 					Else
 						If decl.IsMethod() Then
 						If decl.IsMethod() Then
 							Local class:String = cdecl.munged
 							Local class:String = cdecl.munged