From fa66659456f5034e66963a56b67b254fcd77a019 Mon Sep 17 00:00:00 2001 From: "madmaxoft@gmail.com" Date: Fri, 26 Jul 2013 19:53:47 +0000 Subject: [PATCH] cItemGrid: ChangeSlotCount() now returns -1 if invalid SlotNum git-svn-id: http://mc-server.googlecode.com/svn/trunk@1684 0a769ca7-a7f5-676a-18bf-c427514a06d6 --- source/ItemGrid.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/ItemGrid.cpp b/source/ItemGrid.cpp index e4bcec46e..4e424a668 100644 --- a/source/ItemGrid.cpp +++ b/source/ItemGrid.cpp @@ -345,10 +345,10 @@ int cItemGrid::ChangeSlotCount(int a_SlotNum, int a_AddToCount) { if ((a_SlotNum < 0) || (a_SlotNum >= m_NumSlots)) { - LOGWARNING("%s: Invalid slot number %d out of %d slots, ignoring the call, returning empty item", + LOGWARNING("%s: Invalid slot number %d out of %d slots, ignoring the call, returning -1", __FUNCTION__, a_SlotNum, m_NumSlots ); - return 0; + return -1; } if (m_Slots[a_SlotNum].IsEmpty())