From 9155948ac8f2902acae107e9ff765630295ca6b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ekl=C3=B6f?= Date: Tue, 27 Jun 2023 18:40:25 +0200 Subject: [PATCH] cursor-shape: assert lookup succeeded --- cursor-shape.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cursor-shape.c b/cursor-shape.c index cd9ba221..48f7419f 100644 --- a/cursor-shape.c +++ b/cursor-shape.c @@ -25,6 +25,7 @@ cursor_shape_to_string(enum cursor_shape shape) }; xassert(shape <= ALEN(table)); + xassert(table[shape] != NULL); return table[shape]; } @@ -47,6 +48,7 @@ cursor_shape_to_server_shape(enum cursor_shape shape) }; xassert(shape <= ALEN(table)); + xassert(table[shape] != 0); return table[shape]; } #endif