From ba44c4242f0010ffd39cbd6ff245e28af5dbac75 Mon Sep 17 00:00:00 2001 From: Mahmoud Al-Qudsi Date: Mon, 28 Jun 2021 18:06:04 -0500 Subject: [PATCH] Fix incorrect comparison of function pointers The sort routine was using the address of the **function pointer** `signal(int signal)` rather than the union payload of the same name. Perhaps one of the two should be renamed. --- src/event.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/event.cpp b/src/event.cpp index 0c58c3a1d..684253732 100644 --- a/src/event.cpp +++ b/src/event.cpp @@ -428,7 +428,7 @@ void event_print(io_streams_t &streams, const wcstring &type_filter) { } switch (d1.type) { case event_type_t::signal: - return d1.signal < d2.signal; + return d1.param1.signal < d2.param1.signal; case event_type_t::process_exit: return d1.param1.pid < d2.param1.pid; case event_type_t::job_exit: