From abbe0ceb8d00264552d1695ff79908c5cd38a1ad Mon Sep 17 00:00:00 2001 From: Kelly Martin Date: Sat, 19 May 2012 14:13:32 -0500 Subject: [PATCH] Fix order-of-operations oopsie in DFHack::Items::moveToInventory --- library/modules/Items.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/library/modules/Items.cpp b/library/modules/Items.cpp index f1b7759e3..c7f7c2838 100644 --- a/library/modules/Items.cpp +++ b/library/modules/Items.cpp @@ -755,11 +755,11 @@ bool DFHack::Items::moveToInventory(MapExtras::MapCache &mc, df::item *item, df: if (verbose) { Core::printerr("Item %d is not clothing or armor; it cannot be equipped. Please choose a different item (or use the Ignore option if you really want to equip an inappropriate item).\n", item->id); } return false; } - else if (!item->getType() == df::enums::item_type::GLOVES && - !item->getType() == df::enums::item_type::HELM && - !item->getType() == df::enums::item_type::ARMOR && - !item->getType() == df::enums::item_type::PANTS && - !item->getType() == df::enums::item_type::SHOES && + else if (item->getType() != df::enums::item_type::GLOVES && + item->getType() != df::enums::item_type::HELM && + item->getType() != df::enums::item_type::ARMOR && + item->getType() != df::enums::item_type::PANTS && + item->getType() != df::enums::item_type::SHOES && !targetBodyPart) { if (verbose) { Core::printerr("Item %d is of an unrecognized type; it cannot be equipped (because the module wouldn't know where to put it).\n", item->id); }