summaryrefslogtreecommitdiff
path: root/src/map/party.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/party.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/party.c')
-rw-r--r--src/map/party.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/map/party.c b/src/map/party.c
index e4553036e..a1d45a0e5 100644
--- a/src/map/party.c
+++ b/src/map/party.c
@@ -8,6 +8,7 @@
#include "../common/malloc.h"
#include "../common/showmsg.h"
#include "../common/utils.h"
+#include "../common/strlib.h"
#include "party.h"
#include "atcommand.h" //msg_txt()
@@ -108,13 +109,14 @@ struct party_data* party_searchname(const char* str)
int party_create(struct map_session_data *sd,char *name,int item,int item2)
{
struct party_member leader;
+ char * tname = aStrdup(name);
if(sd->status.party_id) {
clif_party_created(sd,2);
return 0; // "already in a party"
}
- if(strlen(name) < 2)
+ if(strlen(trim(tname)) < 2)
{
clif_party_created(sd, 1);
return 0;
@@ -127,6 +129,7 @@ int party_create(struct map_session_data *sd,char *name,int item,int item2)
leader.leader = 1;
intif_create_party(&leader,name,item,item2);
+ aFree(tname);
return 0;
}