From: Giuseppe Bilotta Date: Thu, 1 Dec 2011 08:13:43 +0000 (+0100) Subject: Fix conditional bug in inventory X-Git-Tag: 0.4.dev-20111202-1~41 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=aab50cd2cc94743d527bfffe46027d4ab765e99a;p=oweals%2Fminetest.git Fix conditional bug in inventory A spurious semicolon after the conditional checking for the drop count to be not higher than the owned count caused the subsequent count = getCount() to be always executed. Fix by removing the extra semicolon. --- diff --git a/src/inventory.cpp b/src/inventory.cpp index 5523f7c91..e8475b741 100644 --- a/src/inventory.cpp +++ b/src/inventory.cpp @@ -212,7 +212,7 @@ bool InventoryItem::dropOrPlace(ServerEnvironment *env, s16 dropcount = getDropCount(); if(count < 0 || count > dropcount) count = dropcount; - if(count < 0 || count > getCount()); + if(count < 0 || count > getCount()) count = getCount(); if(count > 0) {