Restore animations reading when first animation header n = 0.

This commit is contained in:
lzwdgc 2020-12-10 03:19:44 +03:00
parent 649fb9fb97
commit c2565c4cb5

View file

@ -265,6 +265,10 @@ void animation::load(const buffer &b)
READ_STRING_N(b, name, 0xC); READ_STRING_N(b, name, 0xC);
for (auto &s : segments) for (auto &s : segments)
s.loadHeader(b); s.loadHeader(b);
// do not remove!
// if first segment has n = 0, we do not read anything
if (segments[0].n == 0)
return;
for (auto &s : segments) for (auto &s : segments)
s.loadData(b); s.loadData(b);
} }