From d0b4b1e8a594d370e07f2d7570f747546e135aeb Mon Sep 17 00:00:00 2001 From: morkt Date: Fri, 5 Feb 2016 15:51:43 +0400 Subject: [PATCH] variation of Circus resource archives. --- ArcFormats/Circus/ArcCircus.cs | 10 +++++++--- supported.html | 1 + 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/ArcFormats/Circus/ArcCircus.cs b/ArcFormats/Circus/ArcCircus.cs index bc4032a3..6113bd1b 100644 --- a/ArcFormats/Circus/ArcCircus.cs +++ b/ArcFormats/Circus/ArcCircus.cs @@ -2,7 +2,7 @@ //! \date Mon Jun 15 16:11:56 2015 //! \brief Circus archive format. // -// Copyright (C) 2015 by morkt +// Copyright (C) 2015-2016 by morkt // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to @@ -51,6 +51,8 @@ namespace GameRes.Formats.Circus if (count <= 1 || count > 0xfffff) return null; var dir = ReadIndex (file, count, 0x30); + if (null == dir) + dir = ReadIndex (file, count, 0x3C); if (null == dir) return null; return new ArcFile (file, this, dir); @@ -64,12 +66,14 @@ namespace GameRes.Formats.Circus return null; --count; uint next_offset = file.View.ReadUInt32 (index_offset+name_length); + if (next_offset < 4+index_size) + return null; var dir = new List (count); for (int i = 0; i < count; ++i) { - if (0 == file.View.ReadByte (index_offset)) - return null; string name = file.View.ReadString (index_offset, (uint)name_length); + if (0 == name.Length) + return null; var entry = FormatCatalog.Instance.Create (name); index_offset += name_length; uint offset = next_offset; diff --git a/supported.html b/supported.html index db851753..a7216fa0 100644 --- a/supported.html +++ b/supported.html @@ -391,6 +391,7 @@ Soshite Ashita no Sekai yori
*.bABMP7
abmp10
abmp11No *.pngDPNGNo *.dat-NoCircus +Infantaria XP
Maid no Yakata ~Zetsubou Hen~
*.crxCRXGNo