From 02327eebae56a209c5f3d319af1581530e97aeb5 Mon Sep 17 00:00:00 2001 From: Kevin Easton Date: Tue, 29 Oct 2013 13:25:10 +0000 Subject: [PATCH] Fix STATUS_NOTIFY so that it appears in the right window. The old code was reusing the 'window' variable, which means that it could pick up the STATUS_NOTIFY format from the wrong window. You would only have noticed this if you have windows with different settings for STATUS_NOTIFY. git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@425 13b04d17-f746-0410-82c6-800466cd88b0 --- Changelog | 2 ++ source/status.c | 8 ++++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/Changelog b/Changelog index 8ab6cad..2fe8b90 100644 --- a/Changelog +++ b/Changelog @@ -1,5 +1,7 @@ [Changes 1.2c01] +* Fix STATUS_NOTIFY so that it appears in the right window. (caf) + * Improve handling of padding in status formats. (caf) * Use system setenv() in preference to compat bsd_setenv(). (caf) diff --git a/source/status.c b/source/status.c index 03390dc..f92eefa 100644 --- a/source/status.c +++ b/source/status.c @@ -988,14 +988,14 @@ static char *status_notify_windows(Window *window) if (get_int_var(SHOW_STATUS_ALL_VAR) || window == window->screen->current_window) { *notes = 0; - window = NULL; - while ((traverse_all_windows(&window))) + Window *notify_win = NULL; + while ((traverse_all_windows(¬ify_win))) { - if (window->miscflags & WINDOW_NOTIFIED) + if (notify_win->miscflags & WINDOW_NOTIFIED) { if (doneone++) strlcat(notes, ",", sizeof notes); - strlcat(notes, ltoa(window->refnum), sizeof notes); + strlcat(notes, ltoa(notify_win->refnum), sizeof notes); } } }