ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/server/c_wiz.C
(Generate patch)

Comparing deliantra/server/server/c_wiz.C (file contents):
Revision 1.96 by root, Wed Dec 5 19:18:31 2018 UTC vs.
Revision 1.97 by root, Wed Dec 5 19:31:26 2018 UTC

942 * This adds exp to a player. We now allow adding to a specific skill. 942 * This adds exp to a player. We now allow adding to a specific skill.
943 */ 943 */
944int 944int
945command_addexp (object *op, char *params) 945command_addexp (object *op, char *params)
946{ 946{
947 char buf[MAX_BUF], skill[MAX_BUF]; 947 char buf[1024], skill[1024];
948 int q; 948 int q;
949 long long i; // use sint64 and finally provide format specifiers for sint64 etc. via configure 949 sint64 i;
950 object *skillob = NULL; 950 object *skillob = NULL;
951 951
952 skill[0] = '\0'; 952 skill[0] = '\0';
953 if ((params == NULL) || (strlen (params) > MAX_BUF) || ((q = sscanf (params, "%s %lld %[^\n]", buf, &i, skill)) < 2)) 953 if ((params == NULL) || (strlen (params) > MAX_BUF) || ((q = sscanf (params, "%1023s %" SCNd64 " %1023[^\n]", buf, &i, skill)) < 2))
954 { 954 {
955 new_draw_info (NDI_UNIQUE, 0, op, "Usage: addexp <who> <how much> [<skill>]."); 955 new_draw_info (NDI_UNIQUE, 0, op, "Usage: addexp <who> <how much> [<skill>].");
956 return 1; 956 return 1;
957 } 957 }
958 958

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines