summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2014-03-17 17:13:11 +0100
committerHaru <haru@dotalux.com>2014-03-17 17:15:01 +0100
commit1cf8ea92f8e8e992617addc371272c78e60df219 (patch)
tree874e78d65621186d85b17967da3f391a92f55d2c
parent649dc74e6ae7813dbd0a7ad1844278ee629e038c (diff)
downloadhercules-1cf8ea92f8e8e992617addc371272c78e60df219.tar.gz
hercules-1cf8ea92f8e8e992617addc371272c78e60df219.tar.bz2
hercules-1cf8ea92f8e8e992617addc371272c78e60df219.tar.xz
hercules-1cf8ea92f8e8e992617addc371272c78e60df219.zip
Follow-up to 0e58529 (for MSVC compatibility)
- Fixes bugreport:8097, thanks to Frost http://hercules.ws/board/tracker/issue-8097-compile-issue-using-msvc-2010-windows-7-64bit/ Signed-off-by: Haru <haru@dotalux.com>
-rw-r--r--src/map/map.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/map/map.c b/src/map/map.c
index 9dbe19666..dfcc7f47a 100644
--- a/src/map/map.c
+++ b/src/map/map.c
@@ -5575,7 +5575,7 @@ int do_init(int argc, char *argv[])
bool minimal = false;
bool scriptcheck = false;
int i, load_extras_count = 0;
- const char **load_extras = NULL;
+ char **load_extras = NULL;
#ifdef GCOLLECT
GC_enable_incremental();
@@ -5592,12 +5592,12 @@ int do_init(int argc, char *argv[])
const char* arg = argv[i];
if( strcmp(arg, "--load-plugin") == 0 ) {
if( map->arg_next_value(arg, i, argc, true) ) {
- RECREATE(load_extras, const char *, ++load_extras_count);
+ RECREATE(load_extras, char *, ++load_extras_count);
load_extras[load_extras_count-1] = argv[++i];
}
}
}
- HPM->config_read(load_extras, load_extras_count);
+ HPM->config_read((const char * const *)load_extras, load_extras_count);
if (load_extras) {
aFree(load_extras);
load_extras = NULL;
@@ -5656,7 +5656,7 @@ int do_init(int argc, char *argv[])
i++;
} else if( strcmp(arg, "load-script") == 0 ) {
if( map->arg_next_value(arg, i, argc, true) ) {
- RECREATE(load_extras, const char *, ++load_extras_count);
+ RECREATE(load_extras, char *, ++load_extras_count);
load_extras[load_extras_count-1] = argv[++i];
}
} else {
@@ -5686,7 +5686,7 @@ int do_init(int argc, char *argv[])
map->config_read_sub(map->MAP_CONF_NAME);
// loads npcs
- map->reloadnpc(false, load_extras, load_extras_count);
+ map->reloadnpc(false, (const char * const *)load_extras, load_extras_count);
chrif->checkdefaultlogin();