lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On 05-02-2023 17:43, Yongheng Chen wrote:

---
for i = 0, 0 do
    local function f(...)
        _ENV[i], a = 0
        return #_ENV
    end
    f((0 % f((0))))
end
---
 
 
--
Best Wishes,
Yongheng Chen

Hi,

I'm missing something, why should #_ENV resolve to anything but 0 in this code?
As I'm reading the code, I expect there to be a '0 % 0', which is a division by zero.

Cheers,

~b