Skip to content

Commit

Permalink
fix crash when send "/con anytext" #13 (comment)
Browse files Browse the repository at this point in the history
  • Loading branch information
HarpyWar committed Jul 8, 2014
1 parent a091669 commit 5d7049c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/bnetd/command.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3237,7 +3237,7 @@ namespace pvpgn
message_send_text(c, message_type_info, c, msgtemp);
}
else
if (std::strcmp(&text[i], "all") == 0) /* print extended info */
if (std::strcmp(text, "all") == 0) /* print extended info */
{
if (prefs_get_hide_addr() && !(account_get_command_groups(conn_get_account(c)) & command_get_group("/admin-addr")))
msgtemp = localize(c, " -#- -class ----state--- -tag -----name------ -session-- -flag- -lat(ms)- ----channel---- --game--");
Expand Down

2 comments on commit 5d7049c

@RElesgoe
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does the server always crash? I tried recreating the problem but it doesn't crash

@HarpyWar
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It occurred due to my mistake when I refactored the command arguments splitting. Server crashes because var i is not defined (and not used) in the function.

Please sign in to comment.