瀏覽代碼

bugfix C generation

ncannasse 6 年之前
父節點
當前提交
e23ed11c60
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      src/generators/hl2c.ml

+ 2 - 2
src/generators/hl2c.ml

@@ -1126,12 +1126,12 @@ let make_types_idents htypes =
 	let make_sign d =
 		String.sub (Digest.to_hex (Digest.bytes (Marshal.to_bytes d [Marshal.Compat_32]))) 0 7
 	in
-	let desc_string d =
+	let rec desc_string d =
 		match d with
 		| DSimple (HNull t) ->
 			"$t_nul_" ^ tstr t
 		| DSimple (HRef t) ->
-			"$t_ref_" ^ tstr t
+			"$t_ref_" ^ (match make_desc t with DSimple _ -> tstr t | d -> desc_string d)
 		| DSimple t ->
 			"$t_" ^ tstr t
 		| DFun _ ->