RGBGFX does not validate tile indices
Closed this issue · 1 comments
ISSOtm commented
% rgbgfx -r 40 -t bg_currents.bin -b 1 -o tileset.2bpp map.png
/usr/include/c++/14.1.1/bits/stl_vector.h:1149: constexpr std::vector<_Tp, _Alloc>::const_reference std::vector<_Tp, _Alloc>::operator[](size_type) const [with _Tp = unsigned char; _Alloc = default_init_allocator<unsigned char, std::allocator<unsigned char> >; const_reference = const unsigned char&; size_type = long unsigned int]: Assertion '__n < this->size()' failed.
zsh: IOT instruction (core dumped) rgbgfx -r 40 -t bg_currents.bin -b 1 -o tileset.2bpp /map.png
The tilemap references tile IDs that aren't present in the tile data (turns out they're loaded separately), but this shouldn't cause a crash.