Skip to content
Permalink
Browse files

Fixed localization of 'next' variable, which was causing debugger fai…

…lure
  • Loading branch information...
pkulchenko committed Jan 6, 2012
1 parent 4246d76 commit 867de8f3e46ea0ff868a9ae78c632a03fdf7747c
Showing with 6 additions and 6 deletions.
  1. +6 −6 src/editor/filetree.lua
@@ -66,8 +66,8 @@ local function treeAddDir(tree,parent_id,rootdir)
if item then -- existing item
-- keep deleting items until we find item
while true do
next = curr and tree:GetNextSibling(curr)
or tree:GetFirstChild(parent_id)
local next = curr and tree:GetNextSibling(curr)
or tree:GetFirstChild(parent_id)
if not next:IsOk() or name == tree:GetItemText(next) then
curr = next
break
@@ -92,8 +92,8 @@ local function treeAddDir(tree,parent_id,rootdir)
if item then -- existing item
-- keep deleting items until we find item
while true do
next = curr and tree:GetNextSibling(curr)
or tree:GetFirstChild(parent_id)
local next = curr and tree:GetNextSibling(curr)
or tree:GetFirstChild(parent_id)
if not next:IsOk() or name == tree:GetItemText(next) then
curr = next
break
@@ -108,8 +108,8 @@ local function treeAddDir(tree,parent_id,rootdir)

-- delete any leftovers (something that exists in the tree, but not on disk)
while true do
next = curr and tree:GetNextSibling(curr)
or tree:GetFirstChild(parent_id)
local next = curr and tree:GetNextSibling(curr)
or tree:GetFirstChild(parent_id)
if not next:IsOk() then break end
tree:Delete(next)
end

0 comments on commit 867de8f

Please sign in to comment.
You can’t perform that action at this time.