aboutsummaryrefslogtreecommitdiffstats
path: root/src/inventory.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/inventory.cpp')
-rw-r--r--src/inventory.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/inventory.cpp b/src/inventory.cpp
index 83c40f6..3690de5 100644
--- a/src/inventory.cpp
+++ b/src/inventory.cpp
@@ -49,14 +49,14 @@ int Inventory::addItem(ITEM_ID id,unsigned char count){
if(item[i].id==id){
item[i].count+=count;
#ifdef DEBUG
- DEBUG_printf("Gave player %u more %s(s).\n",count,itemName[i]);
+ DEBUG_printf("Gave player %u more %s(s).\n",count,itemName[item[i].id]);
#endif // DEBUG
return 0;
}else if(!item[i].count){
item[i].id=id;
item[i].count=count;
#ifdef DEBUG
- DEBUG_printf("Gave player %u %s(s).\n",count,itemName[i]);
+ DEBUG_printf("Gave player %u %s(s).\n",count,itemName[item[i].id]);
#endif // DEBUG
return 0;
}