From: Giuseppe Bilotta Date: Thu, 1 Dec 2011 08:13:43 +0000 (+0100) Subject: Fix conditional bug in inventory X-Git-Url: http://81.2.79.47:8989/gitweb/?a=commitdiff_plain;h=aab50cd2cc94743d527bfffe46027d4ab765e99a;p=zefram%2Fminetest%2Fminetest_engine.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 5523f7c9..e8475b74 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) {