From 33c62908649951bb47af3918b69d3ebc9d6fd63b Mon Sep 17 00:00:00 2001 From: FlightControl Date: Sun, 2 Jul 2017 00:29:17 +0200 Subject: [PATCH] Fixed error with __ Had to test for the presence in raw format, not using __Index --- Moose Development/Moose/Core/Base.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Moose Development/Moose/Core/Base.lua b/Moose Development/Moose/Core/Base.lua index c7dd7f446..511610786 100644 --- a/Moose Development/Moose/Core/Base.lua +++ b/Moose Development/Moose/Core/Base.lua @@ -234,7 +234,7 @@ function BASE:New() -- This is for "private" methods... -- When a __ is passed to a method as "self", the __index will search for the method on the public method list too! - if self.__ then + if rawget( self, "__" ) then setmetatable( self, { __index = self.__ } ) end @@ -254,7 +254,7 @@ function BASE:Inherit( Child, Parent ) -- This is for "private" methods... -- When a __ is passed to a method as "self", the __index will search for the method on the public method list of the same object too! - if Child.__ then + if rawget( Child, "__" ) then setmetatable( Child, { __index = Child.__ } ) setmetatable( Child.__, { __index = Parent } ) else