VOXELFORMAT: use PaletteMaxColors

master
Martin Gerhardy 2022-05-18 19:30:33 +02:00
parent 7d73a9f9ca
commit d447100a23
1 changed files with 1 additions and 1 deletions

View File

@ -396,7 +396,7 @@ bool VXMFormat::loadGroups(const core::String &filename, io::SeekableReadStream&
uint8_t materialAmount;
wrap(stream.readUInt8(materialAmount));
Log::debug("Palette of size %i", (int)materialAmount);
if (materialAmount > _paletteMapping.size()) {
if (materialAmount > voxel::PaletteMaxColors) {
Log::error("Invalid material size found: %u", materialAmount);
return false;
}