From 0df67e797148a637c7f790919f0ea0547b3f4033 Mon Sep 17 00:00:00 2001 From: Philipp Schafft Date: Fri, 16 Sep 2022 18:44:42 +0000 Subject: [PATCH] Update: Avoid re-assigning source and client pointers --- src/event.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/event.c b/src/event.c index 2c5791c2..3009a382 100644 --- a/src/event.c +++ b/src/event.c @@ -473,10 +473,9 @@ void event_emit_va(const char *trigger, ...) { if (key == EVENT_EXTRA_LIST_END) { break; - } else if (key == EVENT_EXTRA_SOURCE) { - source = va_arg(ap, source_t *); - } else if (key == EVENT_EXTRA_CLIENT) { - client = va_arg(ap, client_t *); + } else if (key == EVENT_EXTRA_SOURCE || key == EVENT_EXTRA_CLIENT) { + /* shift one arg off */ + va_arg(ap, const void *); } else { const char *value = va_arg(ap, const char *);