diff options
Diffstat (limited to 'src/map')
-rw-r--r-- | src/map/npc.c | 2 | ||||
-rw-r--r-- | src/map/script.c | 8 | ||||
-rw-r--r-- | src/map/script.h | 2 |
3 files changed, 6 insertions, 6 deletions
diff --git a/src/map/npc.c b/src/map/npc.c index 2b1a541d8..93981e312 100644 --- a/src/map/npc.c +++ b/src/map/npc.c @@ -3567,7 +3567,7 @@ int npc_do_atcmd_event(struct map_session_data* sd, const char* command, const c } st = script->alloc_state(ev->nd->u.scr.script, ev->pos, sd->bl.id, ev->nd->bl.id); - script->setd_sub(st, NULL, ".@atcmd_command$", 0, (void *)command, NULL); + script->setd_sub(st, NULL, ".@atcmd_command$", 0, command, NULL); len = strlen(message); if (len) { diff --git a/src/map/script.c b/src/map/script.c index 804fdd844..3482165f8 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -3358,7 +3358,7 @@ int set_var(struct map_session_data *sd, char *name, void *val) return script->set_reg(NULL, sd, reference_uid(script->add_str(name),0), name, val, NULL); } -void setd_sub(struct script_state *st, struct map_session_data *sd, const char *varname, int elem, void *value, struct reg_db *ref) +void setd_sub(struct script_state *st, struct map_session_data *sd, const char *varname, int elem, const void *value, struct reg_db *ref) { script->set_reg(st, sd, reference_uid(script->add_str(varname),elem), varname, value, ref); } @@ -15923,10 +15923,10 @@ BUILDIN(setd) } } - if( is_string_variable(varname) ) { - script->setd_sub(st, sd, varname, elem, (void *)script_getstr(st, 3), NULL); + if (is_string_variable(varname)) { + script->setd_sub(st, sd, varname, elem, script_getstr(st, 3), NULL); } else { - script->setd_sub(st, sd, varname, elem, (void *)h64BPTRSIZE(script_getnum(st, 3)), NULL); + script->setd_sub(st, sd, varname, elem, (const void *)h64BPTRSIZE(script_getnum(st, 3)), NULL); } return true; diff --git a/src/map/script.h b/src/map/script.h index 9eb473f03..b8e9d1997 100644 --- a/src/map/script.h +++ b/src/map/script.h @@ -692,7 +692,7 @@ struct script_interface { int (*add_str) (const char* p); const char* (*get_str) (int id); int (*search_str) (const char* p); - void (*setd_sub) (struct script_state *st, struct map_session_data *sd, const char *varname, int elem, void *value, struct reg_db *ref); + void (*setd_sub) (struct script_state *st, struct map_session_data *sd, const char *varname, int elem, const void *value, struct reg_db *ref); void (*attach_state) (struct script_state* st); /* */ struct script_queue *(*queue) (int idx); |