summaryrefslogtreecommitdiff
path: root/progs/xdemos/manywin.c
diff options
context:
space:
mode:
Diffstat (limited to 'progs/xdemos/manywin.c')
-rw-r--r--progs/xdemos/manywin.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/progs/xdemos/manywin.c b/progs/xdemos/manywin.c
index 3b0810b2e5..8ad5c4fe49 100644
--- a/progs/xdemos/manywin.c
+++ b/progs/xdemos/manywin.c
@@ -400,6 +400,8 @@ main(int argc, char *argv[])
}
if (n < 1)
n = 1;
+ if (n > MAX_HEADS)
+ n = MAX_HEADS;
printf("%d windows\n", n);
for (i = 0; i < n; i++) {