fixed GSA writing, added always-edit button and search in file and for file
This commit is contained in:
@ -15,6 +15,12 @@ public static class GsaWriter
|
||||
/// <summary>Magic word for the NARD (enhanced) format.</summary>
|
||||
private const uint MAGIC_NARD = 0x4E415244;
|
||||
|
||||
/// <summary>
|
||||
/// End-of-archive terminator written where the next entry's alias length would be.
|
||||
/// The engine's sequential reader stops when it hits this invalid length.
|
||||
/// </summary>
|
||||
private const uint TERMINATOR = 0xFFFFFFFF;
|
||||
|
||||
/// <summary>
|
||||
/// Writes the archive to the specified file path.
|
||||
/// </summary>
|
||||
@ -53,6 +59,11 @@ public static class GsaWriter
|
||||
{
|
||||
WriteEntry(writer, entry, archive);
|
||||
}
|
||||
|
||||
// Write the end-of-archive terminator, aligned like an entry header
|
||||
if (archive.Format == GsaFormat.NARD && archive.OffsetPadding > 0)
|
||||
WritePadding(writer, archive.OffsetPadding);
|
||||
writer.Write(TERMINATOR);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user