list_search not search in disabled objects

This commit is contained in:
p.kosyh 2009-10-11 15:13:45 +00:00
parent 598208e3c9
commit f37fe09761

View file

@ -458,7 +458,7 @@ function list_search(self, n)
return nil
end
end
if isDisabled(self[i]) then
if isDisabled(ref(self[i])) then
return nil;
end
return self[i], i;
@ -1780,7 +1780,7 @@ end
function have(obj)
local o = inv():srch(obj);
o = ref(o);
if isObject(o) and not isDisabled(o) then
if isObject(o) then
return o
end
return nil