Fix conditional bug in inventory
authorGiuseppe Bilotta <giuseppe.bilotta@gmail.com>
Thu, 1 Dec 2011 08:13:43 +0000 (09:13 +0100)
committerPerttu Ahola <celeron55@gmail.com>
Thu, 1 Dec 2011 08:41:24 +0000 (10:41 +0200)
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.

src/inventory.cpp

index 5523f7c91fd1cc810749c2d63553f8c7a7ff59ed..e8475b741b0e6740ad7f5a0b59f7e7df6886cb7e 100644 (file)
@@ -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)
        {