diff options
author | Kevin <Kevin@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2008-04-08 15:22:04 +0000 |
---|---|---|
committer | Kevin <Kevin@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2008-04-08 15:22:04 +0000 |
commit | 87ac3c6f8367ba972124231ff1306ed890abc6b8 (patch) | |
tree | 943b38e35b7e3a6ec2788cb135fe71b0eb73dcee /src/map/party.c | |
parent | bc8ac28af7554e42caa542aae2e334620860fe38 (diff) | |
download | hercules-87ac3c6f8367ba972124231ff1306ed890abc6b8.tar.gz hercules-87ac3c6f8367ba972124231ff1306ed890abc6b8.tar.bz2 hercules-87ac3c6f8367ba972124231ff1306ed890abc6b8.tar.xz hercules-87ac3c6f8367ba972124231ff1306ed890abc6b8.zip |
Apparently I'm the only one that has it out for the alphabet.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12537 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/party.c')
-rw-r--r-- | src/map/party.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/map/party.c b/src/map/party.c index f165fe881..a008d07eb 100644 --- a/src/map/party.c +++ b/src/map/party.c @@ -109,18 +109,17 @@ 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); + char tname[NAME_LENGTH]; + safestrncpy(tname, name, NAME_LENGTH); if(sd->status.party_id) { clif_party_created(sd,2); - aFree(tname); return 0; // "already in a party" } - if(strlen(trim(tname)) < 2) + if(strlen(trim(tname)) == 0) { clif_party_created(sd, 1); - aFree(tname); return 0; } @@ -131,7 +130,6 @@ 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; } |