1
0

cItemGrid: ChangeSlotCount() now returns -1 if invalid SlotNum

git-svn-id: http://mc-server.googlecode.com/svn/trunk@1684 0a769ca7-a7f5-676a-18bf-c427514a06d6
This commit is contained in:
madmaxoft@gmail.com 2013-07-26 19:53:47 +00:00
parent cd8720bf7e
commit fa66659456

View File

@ -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())