mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-31 06:07:37 +01:00
Core/Commands: Add stupid-check for trying to add negative itemID to vendor. Fixes crash #3238
This commit is contained in:
@@ -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