From 6434a83088bf9f6035a3e4ee282ffb34cd51d65f Mon Sep 17 00:00:00 2001 From: Jey Date: Thu, 7 Sep 2017 15:34:33 +0200 Subject: [PATCH] Follow up to 38d225c444c88a3bfc702bbe7c2de60529c1e88f - Fixes a compile warning - Thanks to @Mikegyver and @Daegaladh --- src/map/script.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/map/script.cpp b/src/map/script.cpp index 6f5ada1b58..9e7eb61893 100644 --- a/src/map/script.cpp +++ b/src/map/script.cpp @@ -6760,11 +6760,11 @@ static int script_getitem_randomoption(struct script_state *st, struct item *it, opt_param_idx = reference_getindex(opt_param); for (i = 0; i < opt_id_n && i < MAX_ITEM_RDM_OPT; i++) { - it->option[i].id = (short)(__64BPRTSIZE(get_val2(st,reference_uid(opt_id_id,opt_id_idx+i),opt_id_ref))); + it->option[i].id = static_cast((int32)__64BPRTSIZE(get_val2(st,reference_uid(opt_id_id,opt_id_idx+i),opt_id_ref))); script_removetop(st, -1, 0); - it->option[i].value = (short)(__64BPRTSIZE(get_val2(st,reference_uid(opt_val_id,opt_val_idx+i),opt_val_ref))); + it->option[i].value = static_cast((int32)__64BPRTSIZE(get_val2(st,reference_uid(opt_val_id,opt_val_idx+i),opt_val_ref))); script_removetop(st, -1, 0); - it->option[i].param = (char)(__64BPRTSIZE(get_val2(st,reference_uid(opt_param_id,opt_param_idx+i),opt_param_ref))); + it->option[i].param = static_cast((int32)__64BPRTSIZE(get_val2(st,reference_uid(opt_param_id,opt_param_idx+i),opt_param_ref))); script_removetop(st, -1, 0); } return SCRIPT_CMD_SUCCESS;