summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-02-21 20:59:37 +0300
committerAndrei Karas <akaras@inbox.ru>2016-02-21 20:59:37 +0300
commita7a6a9f932c1d8da883a7744fc85ba10d4ecd3d3 (patch)
treee8d77c3f06498db11d1f9793efdb07709c89928e
parentfabe15b29d7db7823568548da998b24e75f2cce8 (diff)
downloadevol-hercules-a7a6a9f932c1d8da883a7744fc85ba10d4ecd3d3.tar.gz
evol-hercules-a7a6a9f932c1d8da883a7744fc85ba10d4ecd3d3.tar.bz2
evol-hercules-a7a6a9f932c1d8da883a7744fc85ba10d4ecd3d3.tar.xz
evol-hercules-a7a6a9f932c1d8da883a7744fc85ba10d4ecd3d3.zip
Fix compilation warnings.
-rw-r--r--src/elogin/parse.c4
-rw-r--r--src/emap/npc.c2
-rw-r--r--src/emap/parse.c2
-rw-r--r--src/emap/script.c2
4 files changed, 5 insertions, 5 deletions
diff --git a/src/elogin/parse.c b/src/elogin/parse.c
index 66916f9..a59bdb6 100644
--- a/src/elogin/parse.c
+++ b/src/elogin/parse.c
@@ -55,7 +55,7 @@ int elogin_parse_client_login_pre(int *fdPtr,
}
char username[NAME_LENGTH];
safestrncpy(username, (const char*)RFIFOP(fd, 6), NAME_LENGTH);
- int len = strnlen(username, NAME_LENGTH);
+ int len = safestrnlen(username, NAME_LENGTH);
if (clientVersion < 2)
{
login->login_error(fd, 5);
@@ -95,7 +95,7 @@ void elogin_parse_client_login2(int fd)
safestrncpy(username, (const char*)RFIFOP(fd, 2), NAME_LENGTH);
- int len = strnlen(username, NAME_LENGTH);
+ int len = safestrnlen(username, NAME_LENGTH);
if (len < 2 || !(username[len - 2] == '_') || !memchr("FfMm", username[len - 1], 4))
{
login->login_error(fd, 3);
diff --git a/src/emap/npc.c b/src/emap/npc.c
index 1772c0b..1fd3328 100644
--- a/src/emap/npc.c
+++ b/src/emap/npc.c
@@ -5,7 +5,7 @@
#include <stdio.h>
#include <stdlib.h>
-#include <string.h>
+#include <strings.h>
#include "common/HPMi.h"
#include "common/memmgr.h"
diff --git a/src/emap/parse.c b/src/emap/parse.c
index 8147dc8..226bf9c 100644
--- a/src/emap/parse.c
+++ b/src/emap/parse.c
@@ -5,7 +5,7 @@
#include <stdio.h>
#include <stdlib.h>
-#include <string.h>
+#include <strings.h>
#include "common/HPMi.h"
#include "common/memmgr.h"
diff --git a/src/emap/script.c b/src/emap/script.c
index a3ede58..373c5ae 100644
--- a/src/emap/script.c
+++ b/src/emap/script.c
@@ -1672,7 +1672,7 @@ BUILDIN(checkNpcCell)
if (m == -1)
{
- ShowWarning("checknpccell: Attempted to run on unexsitent map '%s', type %d, x/y %d,%d\n", script_getstr(st, 2), type, x, y);
+ ShowWarning("checknpccell: Attempted to run on unexsitent map '%s', type %u, x/y %d,%d\n", script_getstr(st, 2), type, x, y);
return true;
}