From 8dcf7af79199ef46988341b5efabcddd5216f02b Mon Sep 17 00:00:00 2001 From: Quantum Date: Thu, 14 Oct 2021 23:57:17 -0400 Subject: [PATCH] [client] egl: fix parentheses in IDX_AGO definition The old definition could break if complex expressions were passed in as arguments. --- client/renderers/EGL/egl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/renderers/EGL/egl.c b/client/renderers/EGL/egl.c index bf14b6d9..e95378ba 100644 --- a/client/renderers/EGL/egl.c +++ b/client/renderers/EGL/egl.c @@ -54,7 +54,7 @@ #define MAX_BUFFER_AGE 3 #define DESKTOP_DAMAGE_COUNT 4 #define MAX_ACCUMULATED_DAMAGE ((KVMFR_MAX_DAMAGE_RECTS + MAX_OVERLAY_RECTS + 2) * MAX_BUFFER_AGE) -#define IDX_AGO(counter, i, total) ((counter) + (total) - i) % (total) +#define IDX_AGO(counter, i, total) (((counter) + (total) - (i)) % (total)) struct Options {