From 69eca65ef32833f7a0766d1bb5a736c8b36d8d43 Mon Sep 17 00:00:00 2001 From: Ben Harris Date: Tue, 6 Dec 2022 13:34:27 +0000 Subject: [PATCH] Assert that the back-end has provided a background colour If we're going to refer to a specific colour, it seems appropriate to insist that it exists. --- midend.c | 1 + 1 file changed, 1 insertion(+) diff --git a/midend.c b/midend.c index b89de50..a6f5e6b 100644 --- a/midend.c +++ b/midend.c @@ -1312,6 +1312,7 @@ float *midend_colours(midend *me, int *ncolours) float *ret; ret = me->ourgame->colours(me->frontend, ncolours); + assert(*ncolours >= 1); { int i;