Applied ToDictionaryWithConflictLog to MixFile reader.

This commit is contained in:
James Dunne
2012-06-30 01:54:22 -05:00
committed by Chris Forbes
parent 854a9c4eb7
commit 7c4e32bd94

View File

@@ -58,7 +58,9 @@ namespace OpenRA.FileFormats
isEncrypted = 0 != (signature & (uint)MixFileFlags.Encrypted); isEncrypted = 0 != (signature & (uint)MixFileFlags.Encrypted);
if( isEncrypted ) if( isEncrypted )
{ {
index = ParseRaHeader( s, out dataStart ).ToDictionary(x => x.Hash); index = ParseRaHeader(s, out dataStart).ToDictionaryWithConflictLog(x => x.Hash,
"MixFile.RaHeader", null, x => "(offs={0}, len={1})".F(x.Offset, x.Length)
);
return; return;
} }
} }
@@ -66,7 +68,9 @@ namespace OpenRA.FileFormats
s.Seek( 0, SeekOrigin.Begin ); s.Seek( 0, SeekOrigin.Begin );
isEncrypted = false; isEncrypted = false;
index = ParseTdHeader(s, out dataStart).ToDictionary(x => x.Hash); index = ParseTdHeader(s, out dataStart).ToDictionaryWithConflictLog(x => x.Hash,
"MixFile.TdHeader", null, x => "(offs={0}, len={1})".F(x.Offset, x.Length)
);
} }
const long headerStart = 84; const long headerStart = 84;