Advertisement
Guest User

Untitled

a guest
Jun 27th, 2017
46
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. diff --git a/src/server/scripts/Commands/cs_npc.cpp b/src/server/scripts/Commands/cs_npc.cpp
  2. --- a/src/server/scripts/Commands/cs_npc.cpp
  3. +++ b/src/server/scripts/Commands/cs_npc.cpp
  4. @@ -118,7 +118,10 @@
  5. if (team) { teamval = atoi(team); }
  6. if (teamval < 0) { teamval = 0; }
  7.  
  8. - uint32 id = atoi(charID);
  9. + uint32 id = 0;
  10. +
  11. + if(!sscanf(charID, "%d", &id))
  12. + return false;
  13.  
  14. Player *chr = handler->GetSession()->GetPlayer();
  15. float x = chr->GetPositionX();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement