diff options
author | ultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2007-09-16 14:29:51 +0000 |
---|---|---|
committer | ultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2007-09-16 14:29:51 +0000 |
commit | ed347b86057e804d1644fc744e012cb43c7547dd (patch) | |
tree | 2ffd3dddf5a97262b9a6020874d95ebe0c7ae5f0 /src/map/atcommand.c | |
parent | fd6ff31e591191e8f6bbf2dee4bfe9001cc14395 (diff) | |
download | hercules-ed347b86057e804d1644fc744e012cb43c7547dd.tar.gz hercules-ed347b86057e804d1644fc744e012cb43c7547dd.tar.bz2 hercules-ed347b86057e804d1644fc744e012cb43c7547dd.tar.xz hercules-ed347b86057e804d1644fc744e012cb43c7547dd.zip |
Fixed some problems making gcc error out
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11223 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/atcommand.c')
-rw-r--r-- | src/map/atcommand.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/map/atcommand.c b/src/map/atcommand.c index da86e6073..428ff017d 100644 --- a/src/map/atcommand.c +++ b/src/map/atcommand.c @@ -1237,7 +1237,7 @@ int atcommand_rura( const int fd, struct map_session_data* sd, const char* comma *------------------------------------------*/ int atcommand_where(const int fd, struct map_session_data* sd, const char* command, const char* message) { - struct map_session_data *pl_sd = NULL; + struct map_session_data* pl_sd; nullpo_retr(-1, sd); memset(atcmd_player_name, '\0', sizeof atcmd_player_name); @@ -1246,10 +1246,11 @@ int atcommand_where(const int fd, struct map_session_data* sd, const char* comma clif_displaymessage(fd, "Please, enter a player name (usage: @where <char name>)."); return -1; } - - if((pl_sd = map_nick2sd(atcmd_player_name)) == NULL - || strncmp(pl_sd->status.name,atcmd_player_name,NAME_LENGTH) != 0 - || battle_config.hide_GM_session && pc_isGM(sd) < pc_isGM(pl_sd) && !(battle_config.who_display_aid && pc_isGM(sd) >= battle_config.who_display_aid) + + pl_sd = map_nick2sd(atcmd_player_name); + if( pl_sd == NULL + || strncmp(pl_sd->status.name,atcmd_player_name,NAME_LENGTH) != 0 + || (battle_config.hide_GM_session && pc_isGM(sd) < pc_isGM(pl_sd) && !(battle_config.who_display_aid && pc_isGM(sd) >= battle_config.who_display_aid)) ) { clif_displaymessage(fd, msg_txt(3)); // Character not found. return -1; |