[Scummvm-cvs-logs] SF.net SVN: scummvm: [29157] scummvm/trunk/engines/parallaction/inventory. cpp
peres001 at users.sourceforge.net
peres001 at users.sourceforge.net
Sat Oct 6 22:56:17 CEST 2007
Revision: 29157
http://scummvm.svn.sourceforge.net/scummvm/?rev=29157&view=rev
Author: peres001
Date: 2007-10-06 13:56:17 -0700 (Sat, 06 Oct 2007)
Log Message:
-----------
Fixed bug #1808620. The original Inventory::addItem routine relied on a trick that went undetected until r29060 actually broke it. Not all regression is bad, after all.
Modified Paths:
--------------
scummvm/trunk/engines/parallaction/inventory.cpp
Modified: scummvm/trunk/engines/parallaction/inventory.cpp
===================================================================
--- scummvm/trunk/engines/parallaction/inventory.cpp 2007-10-06 18:53:47 UTC (rev 29156)
+++ scummvm/trunk/engines/parallaction/inventory.cpp 2007-10-06 20:56:17 UTC (rev 29157)
@@ -265,8 +265,12 @@
if (_numItems == INVENTORY_MAX_ITEMS)
return -1;
+ // NOTE: items whose name == 0 aren't really inventory items,
+ // but the engine expects the inventory to accept them as valid.
+ // This nasty trick has been discovered because of regression
+ // after r29060.
if (name == 0)
- return -1;
+ return 0;
_items[_numItems]._id = value;
_items[_numItems]._index = name;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list