diff options
Diffstat (limited to 'src/char')
-rw-r--r-- | src/char/int_guild.c | 4 | ||||
-rw-r--r-- | src/char/inter.c | 10 |
2 files changed, 6 insertions, 8 deletions
diff --git a/src/char/int_guild.c b/src/char/int_guild.c index 2bf3e0a41..235ddc77a 100644 --- a/src/char/int_guild.c +++ b/src/char/int_guild.c @@ -1516,9 +1516,7 @@ int mapif_parse_GuildMasterChange(int fd, int guild_id, const char* name, int le g->member[pos].position = g->member[0].position; g->member[0].position = 0; //Position 0: guild Master. - strncpy(g->master, name, len); - if (len < NAME_LENGTH) - g->master[len] = '\0'; + safestrncpy(g->master, name, NAME_LENGTH); ShowInfo("int_guild: Guildmaster Changed to %s (Guild %d - %s)\n",name, guild_id, g->name); return mapif_guild_master_changed(g, g->member[0].account_id, g->member[0].char_id); diff --git a/src/char/inter.c b/src/char/inter.c index 6c877de71..9856c13b2 100644 --- a/src/char/inter.c +++ b/src/char/inter.c @@ -53,12 +53,12 @@ int inter_recv_packet_length[]={ 6,-1, 0, 0, 0, 0, 0, 0, 10,-1, 0, 0, 0, 0, 0, 0, //0x3010-0x301f -1, 6,-1,14, 14,19, 6,-1, 14,14, 0, 0, 0, 0, 0, 0, //0x3020-0x302f -1, 6,-1,-1, 55,19, 6,-1, 14,-1,-1,-1, 14,19,186,-1, //0x3030-0x303f - 5, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 5, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, //0x3040-0x304f + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, //0x3050-0x305f + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, //0x3060-0x306f + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, //0x3070-0x307f 48,14,-1, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, //0x3080-0x308f - -1,10,-1, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 0x3090 - 0x309f Homunculus packets [albator] + -1,10,-1, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, //0x3090-0x309f Homunculus packets [albator] }; struct WisData { |