Runs of 64 bytes are invalid, but the encoder would emit them anyway
(which get subsequently interpreted as a run of 0). This obviously
causes some textures to export incorrectly.
We can now export all of UTtech2.utx!
for (size_t i = 0; i < len;) {
unsigned run = 0;
for (size_t i = 0; i < len;) {
unsigned run = 0;
- while (i+run < len && src[i] == src[i+run] && run <= 0x3f)
+ while (i+run < len && src[i] == src[i+run] && run < 0x3f)
run++;
if (run > 1 || src[i] > 0xbf)
run++;
if (run > 1 || src[i] > 0xbf)