From 2b2d3a544c7a968ec0b5d98968a2a288ad7b4a7a Mon Sep 17 00:00:00 2001 From: Amorilia <amorilia@users.sourceforge.net> Date: Sun, 2 Apr 2006 17:55:10 +0000 Subject: [PATCH] Added support for the 20.0.0.5 header. --- niflib.cpp | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/niflib.cpp b/niflib.cpp index 5142cfd5..a92a8e17 100644 --- a/niflib.cpp +++ b/niflib.cpp @@ -189,13 +189,24 @@ vector<blk_ref> ReadNifList( istream & in ) { } //There is an Unknown Int here from version 10.1.0.0 on - uint unknownInt1; + uint unknownInt1 = 0; if ( version >= VER_10_1_0_0 ) { unknownInt1 = ReadUInt( in ); } uint numBlocks = ReadUInt( in ); + if ( unknownInt1 != 0 ) { + uint len; + ReadUInt( in ); + len = ReadByte( in ); + for (int i = 0; i < len; i++) ReadByte( in ); + len = ReadByte( in ); + for (int i = 0; i < len; i++) ReadByte( in ); + len = ReadByte( in ); + for (int i = 0; i < len; i++) ReadByte( in ); + } + vector<string> blockTypes; vector<short> blockTypeIndex; //New header data exists from version 5.0.0.1 on -- GitLab