summaryrefslogtreecommitdiff
path: root/src/map/guild.c
diff options
context:
space:
mode:
authorKevin <Kevin@54d463be-8e91-2dee-dedb-b68131a5f0ec>2008-04-08 14:59:59 +0000
committerKevin <Kevin@54d463be-8e91-2dee-dedb-b68131a5f0ec>2008-04-08 14:59:59 +0000
commitc515658d44a9d43f549c34ff8ae001170d57844e (patch)
treeddf506f3f20d066d03df3ffee73cdbb9f91d9e6b /src/map/guild.c
parented8b7da35e01181455c0ec3c3a30650967713b84 (diff)
downloadhercules-c515658d44a9d43f549c34ff8ae001170d57844e.tar.gz
hercules-c515658d44a9d43f549c34ff8ae001170d57844e.tar.bz2
hercules-c515658d44a9d43f549c34ff8ae001170d57844e.tar.xz
hercules-c515658d44a9d43f549c34ff8ae001170d57844e.zip
The fix in r12521 will now temporarily trim white space before checking the string length when creating a guild/party. (bugreport:1328)
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12535 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/guild.c')
-rw-r--r--src/map/guild.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/map/guild.c b/src/map/guild.c
index 473599cc7..658fe740f 100644
--- a/src/map/guild.c
+++ b/src/map/guild.c
@@ -400,9 +400,10 @@ int guild_send_dot_remove(struct map_session_data *sd)
// 作成要求
int guild_create(struct map_session_data *sd,char *name)
{
+ char *tname = aStrdup(name);
nullpo_retr(0, sd);
- if(sd->status.guild_id || strlen(name) < 2)
+ if(sd->status.guild_id || strlen(trim(tname)) < 2)
{
clif_guild_created(sd,1); // すでに所属している
return 0;
@@ -415,6 +416,7 @@ int guild_create(struct map_session_data *sd,char *name)
return 1;
}
clif_guild_created(sd,3); // エンペリウムがいない
+ aFree(tname);
return 0;
}