[client] egl: fix undefined behaviour with zero size array

This commit is contained in:
Geoffrey McRae
2021-10-20 13:34:16 +11:00
parent c5f71d18c4
commit dca5da02a0
2 changed files with 9 additions and 0 deletions

View File

@@ -211,6 +211,9 @@ inline static bool rectIntersects(const FrameDamageRect * r1, const FrameDamageR
int rectsMergeOverlapping(FrameDamageRect * rects, int count)
{
if (count == 0)
return 0;
bool removed[count];
bool changed;