summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorshennetsind <ind@henn.et>2014-01-11 15:32:29 -0200
committershennetsind <ind@henn.et>2014-01-11 15:32:29 -0200
commitab942065240450c3d2824a8a307f8a1b9bcf9516 (patch)
treefae1902e70f09434072e8816f9566ab093263b77
parent49641019d7b96ff0612161b2c9b2a7fea59f0fb1 (diff)
downloadhercules-ab942065240450c3d2824a8a307f8a1b9bcf9516.tar.gz
hercules-ab942065240450c3d2824a8a307f8a1b9bcf9516.tar.bz2
hercules-ab942065240450c3d2824a8a307f8a1b9bcf9516.tar.xz
hercules-ab942065240450c3d2824a8a307f8a1b9bcf9516.zip
Fixed Bug 7960
http://hercules.ws/board/tracker/issue-7960-scriptc-warnings/ Also applied a temporary adjustment due to ERS_OPT_CLEAN not being consistent (decent fix will follow up, haru and i are working on it) -- thanks to kyeme for pointing it out! Signed-off-by: shennetsind <ind@henn.et>
-rw-r--r--src/common/socket.c2
-rw-r--r--src/map/script.c6
2 files changed, 5 insertions, 3 deletions
diff --git a/src/common/socket.c b/src/common/socket.c
index 1ffa15708..95333cdce 100644
--- a/src/common/socket.c
+++ b/src/common/socket.c
@@ -1407,7 +1407,7 @@ void socket_init(void)
timer->add_interval(timer->gettick()+1000, connect_check_clear, 0, 0, 5*60*1000);
#endif
- ShowInfo("Server supports up to '"CL_WHITE"%lld"CL_RESET"' concurrent connections.\n", rlim_cur);
+ ShowInfo("Server supports up to '"CL_WHITE"%"PRId64""CL_RESET"' concurrent connections.\n", rlim_cur);
/* Hercules Plugin Manager */
HPM->share(session,"session");
diff --git a/src/map/script.c b/src/map/script.c
index 0ce768128..7b640a237 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -2751,6 +2751,8 @@ void script_array_update(struct DBMap **src, int64 num, bool empty) {
} else if ( !empty ) {/* we only move to create if not empty */
sa = ers_alloc(script->array_ers, struct script_array);
sa->id = id;
+ sa->members = NULL;
+ sa->size = 0;
script->array_add_member(sa,index);
idb_put(*src, id, sa);
}
@@ -2917,7 +2919,7 @@ const char* conv_str(struct script_state* st, struct script_data* data)
else if( data_isint(data) )
{// int -> string
CREATE(p, char, ITEM_NAME_LENGTH);
- snprintf(p, ITEM_NAME_LENGTH, "%lld", data->u.num);
+ snprintf(p, ITEM_NAME_LENGTH, "%"PRId64"", data->u.num);
p[ITEM_NAME_LENGTH-1] = '\0';
data->type = C_STR;
data->u.str = p;
@@ -3619,7 +3621,7 @@ int run_func(struct script_state *st)
if (!(script->str_data[func].func(st))) //Report error
script->reportsrc(st);
} else {
- ShowError("script:run_func: '%s' (id=%lld type=%s) has no C function. please report this!!!\n", script->get_str(func), func, script->op2name(script->str_data[func].type));
+ ShowError("script:run_func: '%s' (id=%"PRId64" type=%s) has no C function. please report this!!!\n", script->get_str(func), func, script->op2name(script->str_data[func].type));
script->reportsrc(st);
st->state = END;
}