summaryrefslogtreecommitdiff
path: root/src/char
diff options
context:
space:
mode:
authorultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-10-24 12:14:18 +0000
committerultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-10-24 12:14:18 +0000
commit3ecde465534c93315a1f88430129e8400f4d9fe2 (patch)
treefb1153e7be48da7d89b9697be733124650045fdf /src/char
parent04580084c4ac2113d06a23fdf2ca4596dd04011b (diff)
downloadhercules-3ecde465534c93315a1f88430129e8400f4d9fe2.tar.gz
hercules-3ecde465534c93315a1f88430129e8400f4d9fe2.tar.bz2
hercules-3ecde465534c93315a1f88430129e8400f4d9fe2.tar.xz
hercules-3ecde465534c93315a1f88430129e8400f4d9fe2.zip
* Cleaned up some messy guild code (more to come)
* Cleaned up the mail code, no more pointless dynamic allocation * Added upgrade_svn11548.sql to convert the mail table to new format * Updated vs7 and vs6 project files * Increased the max. send buffer size to 5M since 1M is not enough * Please complain if something stops working ^^; git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11571 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/char')
-rw-r--r--src/char/int_guild.c4
-rw-r--r--src/char/inter.c10
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 {