aboutsummaryrefslogtreecommitdiff
path: root/midend.c
diff options
context:
space:
mode:
authorBen Harris <bjh21@bjh21.me.uk>2022-12-06 13:34:27 +0000
committerBen Harris <bjh21@bjh21.me.uk>2022-12-06 13:34:27 +0000
commit69eca65ef32833f7a0766d1bb5a736c8b36d8d43 (patch)
tree6d4c22b51e74d44220aaac56861a693563216825 /midend.c
parent202b7467d8ad52748eafaf20dfe8136f3f426aad (diff)
downloadpuzzles-69eca65ef32833f7a0766d1bb5a736c8b36d8d43.zip
puzzles-69eca65ef32833f7a0766d1bb5a736c8b36d8d43.tar.gz
puzzles-69eca65ef32833f7a0766d1bb5a736c8b36d8d43.tar.bz2
puzzles-69eca65ef32833f7a0766d1bb5a736c8b36d8d43.tar.xz
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.
Diffstat (limited to 'midend.c')
-rw-r--r--midend.c1
1 files changed, 1 insertions, 0 deletions
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;