summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/scripts/elua/core/util.lua12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/scripts/elua/core/util.lua b/src/scripts/elua/core/util.lua
index 533389904f..e6d59f4ef2 100644
--- a/src/scripts/elua/core/util.lua
+++ b/src/scripts/elua/core/util.lua
@@ -52,13 +52,13 @@ M.Object = {
52 52
53 is_a = function(self, base) 53 is_a = function(self, base)
54 if self == base then return true end 54 if self == base then return true end
55 local pt = self.__proto 55 local protos = self.__protos
56 local is = (pt == base) 56 for i = 1, #protos do
57 while not is and pt do 57 if protos[i]:is_a(base) then
58 pt = pt.__proto 58 return true
59 is = (pt == base) 59 end
60 end 60 end
61 return is 61 return false
62 end, 62 end,
63 63
64 add_parent = function(self, parent) 64 add_parent = function(self, parent)