From c2565c4cb5f2238da954d8d1cd255b107615b5ff Mon Sep 17 00:00:00 2001 From: lzwdgc Date: Thu, 10 Dec 2020 03:19:44 +0300 Subject: [PATCH] Restore animations reading when first animation header n = 0. --- src/model/model.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/model/model.cpp b/src/model/model.cpp index fe2fc09..7465ec9 100644 --- a/src/model/model.cpp +++ b/src/model/model.cpp @@ -265,6 +265,10 @@ void animation::load(const buffer &b) READ_STRING_N(b, name, 0xC); for (auto &s : segments) 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) s.loadData(b); }