From 0d712fadc5c07d067ca6720ee30475a5bc1b96d0 Mon Sep 17 00:00:00 2001 From: "James D. Callahan III" Date: Sun, 6 Mar 2011 11:55:14 -0600 Subject: [PATCH] In recipe_prototype:AddFilters() - don't bxor a filter if it's already set. --- Recipe.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Recipe.lua b/Recipe.lua index 84e9449..2a66043 100644 --- a/Recipe.lua +++ b/Recipe.lua @@ -338,6 +338,10 @@ function recipe_prototype:AddFilters(...) if not self.flags[member_name] then self.flags[member_name] = 0 end + + if bit.band(self.flags[member_name], bitfield[flag_name]) == bitfield[flag_name] then + return + end self.flags[member_name] = bit.bxor(self.flags[member_name], bitfield[flag_name]) end end -- 1.7.9.5