summaryrefslogtreecommitdiff
path: root/src/map
diff options
context:
space:
mode:
Diffstat (limited to 'src/map')
-rw-r--r--src/map/guild.c4
-rw-r--r--src/map/party.c5
2 files changed, 7 insertions, 2 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;
}
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;
}