mirror of
https://github.com/minetest/minetest.git
synced 2024-11-27 01:53:45 +01:00
Fix potential out-of-bounds array index
This commit is contained in:
parent
5aeeb219e3
commit
5e58a95491
@ -346,7 +346,7 @@ void finalColorBlend(video::SColor& result,
|
||||
1, 4, 6, 6, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
};
|
||||
b += emphase_blue_when_dark[b / 8];
|
||||
b += emphase_blue_when_dark[irr::core::clamp(b, 0, 255) / 8];
|
||||
b = irr::core::clamp(b, 0, 255);
|
||||
|
||||
// Artificial light is yellow-ish
|
||||
|
Loading…
Reference in New Issue
Block a user