summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2020-06-01 14:50:02 +0200
committerHaru <haru@dotalux.com>2020-06-01 15:12:21 +0200
commit6a31d1e02cabf8e25cbe339a7adb076eb8a46800 (patch)
tree35ea2280b6b3f129ac9d7463ddea24e06d96d8da /src
parent380eba3b364b915cff8b34a343d482454a0bccc0 (diff)
downloadhercules-6a31d1e02cabf8e25cbe339a7adb076eb8a46800.tar.gz
hercules-6a31d1e02cabf8e25cbe339a7adb076eb8a46800.tar.bz2
hercules-6a31d1e02cabf8e25cbe339a7adb076eb8a46800.tar.xz
hercules-6a31d1e02cabf8e25cbe339a7adb076eb8a46800.zip
Fix a compiler warning in 32 bit builds
Signed-off-by: Haru <haru@dotalux.com>
Diffstat (limited to 'src')
-rw-r--r--src/map/script.c4
-rw-r--r--src/map/skill.c8
2 files changed, 6 insertions, 6 deletions
diff --git a/src/map/script.c b/src/map/script.c
index 682e665b6..743a1779a 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -3692,8 +3692,8 @@ static int set_reg(struct script_state *st, struct map_session_data *sd, int64 n
const char *str = (const char*)value;
if (script->is_permanent_variable(name) && strlen(str) > SCRIPT_STRING_VAR_LENGTH) {
- ShowError("script:set_reg: Value of variable %s is too long: %lu! Maximum is %d. Skipping...\n",
- name, strlen(str), SCRIPT_STRING_VAR_LENGTH);
+ ShowError("script:set_reg: Value of variable %s is too long: %d! Maximum is %d. Skipping...\n",
+ name, (int)strlen(str), SCRIPT_STRING_VAR_LENGTH);
if (st != NULL) {
script->reportsrc(st);
diff --git a/src/map/skill.c b/src/map/skill.c
index 765e3b6bf..25d10b825 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -20662,8 +20662,8 @@ static void skill_validate_name(struct config_setting_t *conf, struct s_skill_db
ShowError("%s: No name specified for skill ID %d in %s! Skipping skill...\n",
__func__, sk->nameid, conf->file);
else if (strlen(name) >= sizeof(sk->name))
- ShowError("%s: Specified name %s for skill ID %d in %s is too long: %lu! Maximum is %lu. Skipping skill...\n",
- __func__, name, sk->nameid, conf->file, strlen(name), sizeof(sk->name) - 1);
+ ShowError("%s: Specified name %s for skill ID %d in %s is too long: %d! Maximum is %d. Skipping skill...\n",
+ __func__, name, sk->nameid, conf->file, (int)strlen(name), (int)sizeof(sk->name) - 1);
else if (skill->name_contains_invalid_character(name))
ShowError("%s: Specified name %s for skill ID %d in %s contains invalid characters! Allowed characters are letters, numbers and underscores. Skipping skill...\n",
__func__, name, sk->nameid, conf->file);
@@ -20719,8 +20719,8 @@ static void skill_validate_description(struct config_setting_t *conf, struct s_s
if (libconfig->setting_lookup_string(conf, "Description", &description) == CONFIG_TRUE && *description != '\0') {
if (strlen(description) >= sizeof(sk->desc))
- ShowWarning("%s: Specified description '%s' for skill ID %d in %s is too long: %lu! Maximum is %lu. Trimming...\n",
- __func__, description, sk->nameid, conf->file, strlen(description), sizeof(sk->desc) - 1);
+ ShowWarning("%s: Specified description '%s' for skill ID %d in %s is too long: %d! Maximum is %d. Trimming...\n",
+ __func__, description, sk->nameid, conf->file, (int)strlen(description), (int)sizeof(sk->desc) - 1);
safestrncpy(sk->desc, description, sizeof(sk->desc));
}