From 2fe3bf5a18eb9aa9f38654b3c0a0729c42408cd6 Mon Sep 17 00:00:00 2001 From: juhdanad Date: Mon, 28 Nov 2016 09:43:33 +0100 Subject: Limit light_source in the engine (#4814) Since light_source>15 causes crash, it must be limited. --- src/voxelalgorithms.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'src/voxelalgorithms.cpp') diff --git a/src/voxelalgorithms.cpp b/src/voxelalgorithms.cpp index 55f0d1c98..93cc33acc 100644 --- a/src/voxelalgorithms.cpp +++ b/src/voxelalgorithms.cpp @@ -264,6 +264,7 @@ struct LightQueue { const mapblock_v3 &block_pos, MapBlock *block, direction source_dir) { + assert(light <= LIGHT_SUN); lights[light].push_back( ChangingLight(rel_pos, block_pos, block, source_dir)); } -- cgit v1.2.3