Browse Source

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

Daniel Rodríguez Rivero 2 năm trước cách đây
mục cha
commit
8983b514bc
1 tập tin đã thay đổi với 2 bổ sung2 xóa
  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