aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Ser <contact@emersion.fr>2019-04-23 22:26:44 +0300
committerDrew DeVault <sir@cmpwn.com>2019-04-23 14:36:02 -0600
commitf42816ce3f702be8a56696bc5d771a1cc9f63d8a (patch)
tree7581a6eb87a112cb11fafd3129b83ff9f77a0d1d
parent20690346c7a9f75cfb181cb613b8f006e6ce3e14 (diff)
render/egl: fix zero-length VLA
-rw-r--r--render/egl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/render/egl.c b/render/egl.c
index ceed1fe6..4785dc9c 100644
--- a/render/egl.c
+++ b/render/egl.c
@@ -367,7 +367,7 @@ bool wlr_egl_swap_buffers(struct wlr_egl *egl, EGLSurface surface,
int nrects;
pixman_box32_t *rects =
pixman_region32_rectangles(&flipped_damage, &nrects);
- EGLint egl_damage[4 * nrects];
+ EGLint egl_damage[4 * nrects + 1];
for (int i = 0; i < nrects; ++i) {
egl_damage[4*i] = rects[i].x1;
egl_damage[4*i + 1] = rects[i].y1;