From 575c779c8d20b4b76d92a104075e325417f99165 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Fri, 12 May 2023 17:09:07 -0400 Subject: Make puglSetSizeHint() tolerate unknown hints on all platforms --- src/x11.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/x11.c') 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); -- cgit v1.2.1