2014-03-26 22:14 GMT+01:00 Denis Golovan <denis.golovan@xxxxxxxxx>: > > for i=0,#arr do > if arr[i] then -- native boolean array access > ... > end > end > > It looks like "arr" (which is just a wrapper for a pointer to a native > array first element) points nowhere or "i" index goes into a large > negative value. > > When accessing native arrays, #arr - 1 is the latest valid index, so your for loop should look like for i=0,#arr-1 do ... end Maik