소스 검색

fix(lua): _hx_field_arr result and idx variables should be local (#10882)

Daniel Rodríguez Rivero 2 년 전
부모
커밋
8983b514bc
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      std/lua/_lua/_hx_anon.lua

+ 2 - 2
std/lua/_lua/_hx_anon.lua

@@ -33,8 +33,8 @@ local function _hx_new(prototype)
 end
 
 function _hx_field_arr(obj)
-    res = {}
-    idx = 0
+    local res = {}
+    local idx = 0
     if obj.__fields__ ~= nil then
         obj = obj.__fields__
     end