diff options
author | Haru <haru@dotalux.com> | 2016-02-19 18:46:18 +0100 |
---|---|---|
committer | Haru <haru@dotalux.com> | 2016-03-20 18:32:07 +0100 |
commit | 8c9e9668cef87ab9595bde6608de424072cc752d (patch) | |
tree | 3645ce8adc6146a867ffd564006d2d8e0b7b1eef /src/map/script.c | |
parent | 138956dcf9415353a4f67de6bc66efa23a04e61c (diff) | |
download | hercules-8c9e9668cef87ab9595bde6608de424072cc752d.tar.gz hercules-8c9e9668cef87ab9595bde6608de424072cc752d.tar.bz2 hercules-8c9e9668cef87ab9595bde6608de424072cc752d.tar.xz hercules-8c9e9668cef87ab9595bde6608de424072cc752d.zip |
Added const qualifier to the value argument of script->setd_sub
Signed-off-by: Haru <haru@dotalux.com>
Diffstat (limited to 'src/map/script.c')
-rw-r--r-- | src/map/script.c | 8 |
1 files changed, 4 insertions, 4 deletions
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; |