Core/Commands: Add stupid-check for trying to add negative itemID to vendor. Fixes crash #3238

This commit is contained in:
kaelima
2011-10-31 00:02:32 +01:00
parent d5ece59acd
commit d9406b0e59

View File

@@ -168,7 +168,11 @@ public:
return false;
}
uint32 itemId = atol(pitem);
int32 item_int = atol(pitem);
if (item_int <= 0)
return true;
uint32 itemId = item_int;
char* fmaxcount = strtok(NULL, " "); //add maxcount, default: 0
uint32 maxcount = 0;