瀏覽代碼

Fixed static generation from method for struct. Fixes #380.

woollybah 6 年之前
父節點
當前提交
ebdf17914f
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      ctranslator.bmx

+ 1 - 1
ctranslator.bmx

@@ -917,7 +917,7 @@ t:+"NULLNULLNULL"
 			Return decl.munged
 		Else If _env And decl.scope And decl.scope=_env.ClassScope()
 			' calling a class function from a method?
-			If TFuncDecl(decl) And _env.ClassScope() And _env.FuncScope() And _env.FuncScope().IsMethod() And Not (decl.attrs & FUNC_PTR) Then
+			If TFuncDecl(decl) And _env.ClassScope() And _env.FuncScope() And _env.FuncScope().IsMethod() And Not (decl.attrs & FUNC_PTR) And Not _env.ClassScope().IsStruct() Then
 				Local scope:TScopeDecl = _env.ClassScope()
 				Local obj:String = Bra("struct " + scope.munged + "_obj*")
 				Local class:String = "o->clas"