Oops. nick must be initialized before old_uh, since it's passed to

fetch_userhost().


git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@420 13b04d17-f746-0410-82c6-800466cd88b0
This commit is contained in:
Tim Cava
2013-10-26 15:16:36 +00:00
parent 0cf0cf1ec4
commit 9a5f10b8c5

View File

@@ -783,8 +783,7 @@ void BX_userhostbase(char *args, void (*line) (UserhostItem *, char *, char *),
int total = 0, userhost_cmd = 0, server_query_reqd = 0; int total = 0, userhost_cmd = 0, server_query_reqd = 0;
char *nick, *ptr, *next_ptr, *body = NULL; char *nick, *ptr, *next_ptr, *body = NULL;
va_list ap; va_list ap;
char buffer[BIG_BUFFER_SIZE]; char buffer[BIG_BUFFER_SIZE], text[BIG_BUFFER_SIZE];
char text[BIG_BUFFER_SIZE];
if (from_server < 0 || !is_server_connected(from_server)) if (from_server < 0 || !is_server_connected(from_server))
return; return;
@@ -873,8 +872,8 @@ void BX_userhostbase(char *args, void (*line) (UserhostItem *, char *, char *),
{ {
while (ptr && *ptr) while (ptr && *ptr)
{ {
const char *old_uh = fetch_userhost(from_server, nick);
char *uh, *nick = next_arg(ptr, &ptr); char *uh, *nick = next_arg(ptr, &ptr);
const char *old_uh = fetch_userhost(from_server, nick);
UserhostItem item = { 0 }; UserhostItem item = { 0 };
uh = LOCAL_COPY(old_uh); uh = LOCAL_COPY(old_uh);