Core/Commands: Add stupid-check for trying to add negative itemID to vendor. Fixes crash #3238
This commit is contained in:
1 parent
d5ece59acd
commit
d9406b0e59
1 file changed
+5
-1
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user