From c4eb819f9f1e8aa15cf06fde131f8e60cd04b061 Mon Sep 17 00:00:00 2001 From: Jaka Kranjc Date: Sat, 11 Jan 2014 16:03:35 +0100 Subject: [PATCH] CheckRemoveItem: just ignore any item with no lower bits set better forward compatibility --- gemrb/plugins/GUIScript/GUIScript.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gemrb/plugins/GUIScript/GUIScript.cpp b/gemrb/plugins/GUIScript/GUIScript.cpp index 6918e50a27..0c6a182852 100644 --- a/gemrb/plugins/GUIScript/GUIScript.cpp +++ b/gemrb/plugins/GUIScript/GUIScript.cpp @@ -7481,9 +7481,10 @@ int CheckRemoveItem(Actor *actor, CREItem *si, int action) } else continue; break; //the named actor cannot remove it except when initiating a swap (used for plain inventory slots) - // and make sure not to treat earrings improperly (add other flags as they come) + // and make sure not to treat earrings improperly case CRI_REMOVEFORSWAP: - if ((UsedItems[i].flags&1 && UsedItems[i].flags&4) || UsedItems[i].flags&16) { + int flags = UsedItems[i].flags; + if ((flags&1 && flags&4) || !(flags&15)) { continue; } // no continue break;