Aurel Bílý 6 年之前
父節點
當前提交
9bcb7251b1
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/generators/hl2c.ml

+ 1 - 1
src/generators/hl2c.ml

@@ -797,7 +797,7 @@ let generate_function ctx f =
 		| OBool (r,b) ->
 		| OBool (r,b) ->
 			sexpr "%s = %s" (reg r) (if b then "true" else "false")
 			sexpr "%s = %s" (reg r) (if b then "true" else "false")
 		| OBytes (r,idx) ->
 		| OBytes (r,idx) ->
-			define "extern vbyte %s;" ctx.bytes_names.(idx);
+			define "extern vbyte %s[];" ctx.bytes_names.(idx);
 			sexpr "%s = %s" (reg r) ctx.bytes_names.(idx)
 			sexpr "%s = %s" (reg r) ctx.bytes_names.(idx)
 		| OString (r,idx) ->
 		| OString (r,idx) ->
 			sexpr "%s = (vbyte*)%s" (reg r) (string ctx idx)
 			sexpr "%s = (vbyte*)%s" (reg r) (string ctx idx)