aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2023-05-12 17:09:07 -0400
committerDavid Robillard <d@drobilla.net>2023-05-12 17:16:33 -0400
commit575c779c8d20b4b76d92a104075e325417f99165 (patch)
treeb63e8d74e17eb7b6d3c66050dd58e4642908355e /src
parent049a7254beb94d33e315930f42b434ded6e29fa5 (diff)
downloadpugl-575c779c8d20b4b76d92a104075e325417f99165.tar.gz
pugl-575c779c8d20b4b76d92a104075e325417f99165.tar.bz2
pugl-575c779c8d20b4b76d92a104075e325417f99165.zip
Make puglSetSizeHint() tolerate unknown hints on all platforms
Diffstat (limited to 'src')
-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);