mirror of
https://github.com/SabreTools/SabreTools.Serialization.git
synced 2026-09-23 15:24:56 +00:00
Fix build
This commit is contained in:
@@ -317,7 +317,7 @@ namespace SabreTools.Serialization.Deserializers
|
||||
return null;
|
||||
|
||||
// TEMPORARY FIX FOR ASCII -> UNICODE
|
||||
directoryEntry.Name = Encoding.Unicode.GetString(Encoding.ASCII.GetBytes(directoryEntry.Name));
|
||||
directoryEntry.Name = Encoding.Unicode.GetString(Encoding.ASCII.GetBytes(directoryEntry.Name!));
|
||||
|
||||
// Handle version 3 entries
|
||||
if (majorVersion == 3)
|
||||
|
||||
@@ -427,10 +427,10 @@ namespace SabreTools.Serialization.Deserializers
|
||||
/// <param name="data">Stream to parse</param>
|
||||
/// <param name="endOffset">First address not part of the imported-name table</param>
|
||||
/// <returns>Filled imported-name table on success, null on error</returns>
|
||||
public static Dictionary<ushort, ImportedNameTableEntry?>? ParseImportedNameTable(Stream data, int endOffset)
|
||||
public static Dictionary<ushort, ImportedNameTableEntry>? ParseImportedNameTable(Stream data, int endOffset)
|
||||
{
|
||||
// TODO: Use marshalling here instead of building
|
||||
var importedNameTable = new Dictionary<ushort, ImportedNameTableEntry?>();
|
||||
var importedNameTable = new Dictionary<ushort, ImportedNameTableEntry>();
|
||||
|
||||
while (data.Position < endOffset)
|
||||
{
|
||||
|
||||
@@ -57,7 +57,7 @@ namespace SabreTools.Serialization.Wrappers
|
||||
Encrypted = directoryEntry.DirectoryFlags.HasFlag(Models.GCF.HL_GCF_FLAG.HL_GCF_FLAG_ENCRYPTED),
|
||||
#endif
|
||||
};
|
||||
var pathParts = new List<string> { directoryEntry.Name ?? string.Empty };
|
||||
var pathParts = new List<string> { this.Model.DirectoryNames![directoryEntry.NameOffset] ?? string.Empty };
|
||||
var blockEntries = new List<Models.GCF.BlockEntry?>();
|
||||
|
||||
// Traverse the parent tree
|
||||
@@ -68,7 +68,7 @@ namespace SabreTools.Serialization.Wrappers
|
||||
if (parentDirectoryEntry == null)
|
||||
break;
|
||||
|
||||
pathParts.Add(parentDirectoryEntry.Name ?? string.Empty);
|
||||
pathParts.Add(this.Model.DirectoryNames![parentDirectoryEntry.NameOffset] ?? string.Empty);
|
||||
index = parentDirectoryEntry.ParentIndex;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user