disallow cli colors from being used

This commit is contained in:
HF 2020-05-15 04:09:31 +02:00
parent 50afa28174
commit 361cbb4991

View File

@ -109,7 +109,7 @@ export async function drawByOffset(
// z out of bounds or weird stuff
throw new Error(4);
}
if (color >= canvas.colors.length) {
if (color >= canvas.colors.length || color < canvas.cli) {
// color out of bounds
throw new Error(5);
}