a327ex/boipushy

Infinite loop with tricky requires (?)

Closed this issue · 0 comments

It could be my fault, but when I'm using Thranduil and it requires this module, the part that does... something with the path goes into an infinite loop.
Relevant code:

local current_path = ''
local current_index = 0
while debug.print ( #current_path ) ~= debug.print ( #input_path ) do
    local _, index, temp = input_path:find( '(.-)%.', current_index )
    if not index then current_path = input_path break end
    if love.filesystem.exists( current_path .. temp ) then -- Allow for . in folder names (even though this isn't currently allowed using require...)
        current_path = current_path .. temp .. '/'
        current_index = index + 1
    end
end

I've grepped the project to see if these variables are used anywhere and couldn't find anything, so I simply commented it out in my local repo.