diff --git a/source/window.c b/source/window.c index f3d38bf..a985f6b 100644 --- a/source/window.c +++ b/source/window.c @@ -1204,14 +1204,13 @@ Window * BX_get_window_by_refnum(unsigned int refnum) { Window *tmp = NULL; - if (refnum < 0) - return NULL; if (refnum == 0) return current_window; - else while ((traverse_all_windows(&tmp))) + + while ((traverse_all_windows(&tmp))) { if (tmp->refnum == refnum) - return (tmp); + return tmp; } return NULL; }