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/guild.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/guild.c')
-rw-r--r-- | src/map/guild.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/map/guild.c b/src/map/guild.c index 0eae68b57..aa91ee3ac 100644 --- a/src/map/guild.c +++ b/src/map/guild.c @@ -400,13 +400,14 @@ int guild_send_dot_remove(struct map_session_data *sd) // 作成要求 int guild_create(struct map_session_data *sd,char *name) { - char *tname = aStrdup(name); + char tname[NAME_LENGTH]; nullpo_retr(0, sd); - if(sd->status.guild_id || strlen(trim(tname)) < 2) + safestrncpy(tname, name, NAME_LENGTH); + + if(sd->status.guild_id || strlen(trim(tname)) == 0) { clif_guild_created(sd,1); // すでに所属している - aFree(tname); return 0; } if(!battle_config.guild_emperium_check || pc_search_inventory(sd,714) >= 0) { @@ -414,11 +415,9 @@ int guild_create(struct map_session_data *sd,char *name) guild_makemember(&m,sd); m.position=0; intif_guild_create(name,&m); - aFree(tname); return 1; } clif_guild_created(sd,3); // エンペリウムがいない - aFree(tname); return 0; } |