From bd4078ad4534096152c7a4b5683f94fb4e56e61a Mon Sep 17 00:00:00 2001 From: Nico Weber Date: Sat, 28 Jan 2023 21:44:28 -0500 Subject: [PATCH] LibGfx: Make ICC EMatrix3x3::operator[] a bit less silly --- Userland/Libraries/LibGfx/ICC/TagTypes.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Userland/Libraries/LibGfx/ICC/TagTypes.h b/Userland/Libraries/LibGfx/ICC/TagTypes.h index 2144686589..343a415fee 100644 --- a/Userland/Libraries/LibGfx/ICC/TagTypes.h +++ b/Userland/Libraries/LibGfx/ICC/TagTypes.h @@ -89,9 +89,9 @@ private: struct EMatrix3x3 { S15Fixed16 e[9]; - S15Fixed16 const& operator[](int i) const + S15Fixed16 const& operator[](unsigned i) const { - VERIFY(i >= 0 && i < 9); + VERIFY(i < array_size(e)); return e[i]; } };