diff options
author | MadCamel <madcamel@gmail.com> | 2010-02-02 22:08:37 -0500 |
---|---|---|
committer | MadCamel <madcamel@gmail.com> | 2010-02-02 22:08:37 -0500 |
commit | 12177093514cfc2cf41282b1cc95974a4c040c42 (patch) | |
tree | d05c15e709bee94eaf59cecc65878dee0e765b13 /src/map/clif.c | |
parent | e6fabf4ccdf96658e5952c5a597bb68b0b801741 (diff) | |
parent | 809146978c6b85bb00ca2441ef2490441f4a91da (diff) | |
download | tmwa-12177093514cfc2cf41282b1cc95974a4c040c42.tar.gz tmwa-12177093514cfc2cf41282b1cc95974a4c040c42.tar.bz2 tmwa-12177093514cfc2cf41282b1cc95974a4c040c42.tar.xz tmwa-12177093514cfc2cf41282b1cc95974a4c040c42.zip |
Merge branch 'master' of git://gitorious.org/tmw-eathena/mainline
Diffstat (limited to 'src/map/clif.c')
-rw-r--r-- | src/map/clif.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/map/clif.c b/src/map/clif.c index c3099d7..86be79c 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -8204,14 +8204,14 @@ void clif_parse_NpcStringInput (int fd, struct map_session_data *sd) len = RFIFOW (fd, 2) - 7; - if (len >= sizeof (sd->npc_str)) + if (len >= sizeof (sd->npc_str)-1) { printf ("clif: input string too long !\n"); memcpy (sd->npc_str, RFIFOP (fd, 8), sizeof (sd->npc_str)); - sd->npc_str[sizeof (sd->npc_str) - 1] = 0; } else strncpy (sd->npc_str, RFIFOP (fd, 8), len); + sd->npc_str[sizeof (sd->npc_str) - 1] = 0; map_scriptcont (sd, RFIFOL (fd, 4)); } |