From eada7b359cb6f7aca97a076f4f91da532e0074b0 Mon Sep 17 00:00:00 2001 From: ai4rei Date: Thu, 2 Dec 2010 14:17:07 +0000 Subject: * Added defines for guild notice sizes (MAX_GUILDMES1 and MAX_GUILDMES2). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14544 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/map/clif.c | 6 +++--- src/map/guild.c | 4 ++-- src/map/intif.c | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) (limited to 'src/map') diff --git a/src/map/clif.c b/src/map/clif.c index d2f4cd786..acc8ffa41 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -7077,8 +7077,8 @@ int clif_guild_notice(struct map_session_data* sd, struct guild* g) WFIFOHEAD(fd,packet_len(0x16f)); WFIFOW(fd,0) = 0x16f; - memcpy(WFIFOP(fd,2), g->mes1, 60); - memcpy(WFIFOP(fd,62), g->mes2, 120); + memcpy(WFIFOP(fd,2), g->mes1, MAX_GUILDMES1); + memcpy(WFIFOP(fd,62), g->mes2, MAX_GUILDMES2); WFIFOSET(fd,packet_len(0x16f)); return 0; } @@ -11169,7 +11169,7 @@ void clif_parse_GuildChangeNotice(int fd, struct map_session_data* sd) // compensate for some client defects when using multilanguage mode if (msg1[0] == '|' && msg1[3] == '|') msg1+= 3; // skip duplicate marker if (msg2[0] == '|' && msg2[3] == '|') msg2+= 3; // skip duplicate marker - if (msg2[0] == '|') msg2[strnlen(msg2, 120)-1] = '\0'; // delete extra space at the end of string + if (msg2[0] == '|') msg2[strnlen(msg2, MAX_GUILDMES2)-1] = '\0'; // delete extra space at the end of string guild_change_notice(sd, guild_id, msg1, msg2); } diff --git a/src/map/guild.c b/src/map/guild.c index cdc978929..f90fc8946 100644 --- a/src/map/guild.c +++ b/src/map/guild.c @@ -1068,8 +1068,8 @@ int guild_notice_changed(int guild_id,const char *mes1,const char *mes2) if(g==NULL) return 0; - memcpy(g->mes1,mes1,60); - memcpy(g->mes2,mes2,120); + memcpy(g->mes1,mes1,MAX_GUILDMES1); + memcpy(g->mes2,mes2,MAX_GUILDMES2); for(i=0;imax_member;i++){ if((sd=g->member[i].sd)!=NULL) diff --git a/src/map/intif.c b/src/map/intif.c index ba5230bab..15d948c59 100644 --- a/src/map/intif.c +++ b/src/map/intif.c @@ -698,8 +698,8 @@ int intif_guild_notice(int guild_id,const char *mes1,const char *mes2) WFIFOHEAD(inter_fd,186); WFIFOW(inter_fd,0)=0x303e; WFIFOL(inter_fd,2)=guild_id; - memcpy(WFIFOP(inter_fd,6),mes1,60); - memcpy(WFIFOP(inter_fd,66),mes2,120); + memcpy(WFIFOP(inter_fd,6),mes1,MAX_GUILDMES1); + memcpy(WFIFOP(inter_fd,66),mes2,MAX_GUILDMES2); WFIFOSET(inter_fd,186); return 0; } -- cgit v1.2.3-70-g09d2