From dde3255b07c8f925c48e831c0e6e687b491485c8 Mon Sep 17 00:00:00 2001 From: Alexander Batalov Date: Thu, 20 Jul 2023 09:21:26 +0300 Subject: [PATCH] Fix endless loop while cleaning up timed msgs --- src/window_manager_private.cc | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/src/window_manager_private.cc b/src/window_manager_private.cc index f844259..a9c230c 100644 --- a/src/window_manager_private.cc +++ b/src/window_manager_private.cc @@ -1402,26 +1402,21 @@ void _tm_watch_msgs() // 0x4DD6C0 void _tm_kill_msg() { - int v0; - - v0 = _tm_kill; - if (v0 != -1) { + if (_tm_kill != -1) { windowDestroy(_tm_queue[_tm_kill].field_4); _tm_location[_tm_queue[_tm_kill].field_8].field_0 = 0; - if (v0 == 5) { - v0 = 0; + _tm_kill++; + if (_tm_kill == 5) { + _tm_kill = 0; } - if (v0 == _tm_add) { + if (_tm_kill == _tm_add) { _tm_add = 0; _tm_kill = -1; tickersRemove(_tm_watch_msgs); - v0 = _tm_kill; } } - - _tm_kill = v0; } // 0x4DD744