fix pixel remove on 3d canvas

This commit is contained in:
HF 2020-05-15 15:20:29 +02:00
parent 53acf388a4
commit 2b8b5b5888

View File

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