aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/x11.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/x11.c b/src/x11.c
index 1c34e92..4eb87ce 100644
--- a/src/x11.c
+++ b/src/x11.c
@@ -2013,6 +2013,10 @@ puglSetSizeHint(PuglView* const view,
const PuglSpan width,
const PuglSpan height)
{
+ if ((unsigned)hint >= PUGL_NUM_SIZE_HINTS) {
+ return PUGL_BAD_PARAMETER;
+ }
+
view->sizeHints[hint].width = width;
view->sizeHints[hint].height = height;
return updateSizeHints(view);