summaryrefslogtreecommitdiff
path: root/src/map/script.c
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 /src/map/script.c
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>
Diffstat (limited to 'src/map/script.c')
-rw-r--r--src/map/script.c6
1 files changed, 4 insertions, 2 deletions
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;
}