From 1a18fb9893df4d3cb40910d41acf875c7c6ea773 Mon Sep 17 00:00:00 2001 From: ai4rei Date: Sun, 20 Mar 2011 20:19:23 +0000 Subject: * Random accumulated tweaks and fixes. - Added a error message to npc_enable, to spot disablenpc/enablenpc/hideoffnpc/hideonnpc on non-existing NPCs (related r14750). - Replaced inlined npc_name2id code with calls to npc_name2id. - Open Buying Store skill is now exempted from noskill mapflag like Vending as well (bugreport:4815, follow up to r14713). - Fixed signed constant being returned as unsigned value in get_percentage (bugreport:4765, since r12679). - Replaced strlen checks, which checked whether or not a string is empty, with first-byte checks. - Fixed enabling 'fakename' not clearing party and guild name and cleaned up atcommand 'fakename' code. - Cleaned up party/guild name code in clif_charnameack (follow up to r14737). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14751 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/map/guild.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/map/guild.c') diff --git a/src/map/guild.c b/src/map/guild.c index 7b20808d6..e56b346ec 100644 --- a/src/map/guild.c +++ b/src/map/guild.c @@ -357,7 +357,9 @@ int guild_create(struct map_session_data *sd, const char *name) nullpo_ret(sd); safestrncpy(tname, name, NAME_LENGTH); - if( strlen(trim(tname)) == 0 ) + trim(tname); + + if( !tname[0] ) return 0; // empty name if( sd->status.guild_id ) -- cgit v1.2.3-70-g09d2