Skip to content

Commit d678509

Browse files
committed
Fix MMF1.5 Extension reading. Why wasn't this ever an issue before? Something fishy is going on.
1 parent eec9e38 commit d678509

2 files changed

Lines changed: 12 additions & 7 deletions

File tree

Nebula.Core/Data/Chunks/AppChunks/Extension.cs

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,17 @@ public override void ReadCCN(ByteReader reader, params object[] extraInfo)
2424

2525
short size = Math.Abs(reader.ReadShort());
2626
Handle = reader.ReadShort();
27-
MagicNumber = reader.ReadInt();
28-
VersionLs = reader.ReadInt();
29-
VersionMs = reader.ReadInt();
30-
FileName = reader.ReadYuniversal();
27+
MagicNumber = reader.ReadInt();
28+
29+
if (NebulaCore.Fusion > 1.5f)
30+
{
31+
VersionLs = reader.ReadInt();
32+
VersionMs = reader.ReadInt();
33+
}
34+
35+
FileName = reader.ReadYuniversal();
36+
SubType = reader.ReadYuniversal();
3137
Name = FileName[..FileName.LastIndexOf('.')];
32-
SubType = reader.ReadYuniversal();
3338
reader.Seek(start + size);
3439
}
3540

Nebula.Core/Data/Chunks/ChunkList.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ public class ChunkList
2323
{ 0x2225, typeof(Author) },
2424
{ 0x2226, typeof(MenuBar) },
2525
{ 0x2227, typeof(ExtensionsPath) },
26-
//0x2228 Extensions
27-
{ 0x2229, typeof(FrameItems) },
26+
{ 0x2228, typeof(Extensions) },
27+
{ 0x2229, typeof(FrameItems) },
2828
//0x222A GlobalEvents
2929
{ 0x222B, typeof(FrameHandles) },
3030
{ 0x222C, typeof(ExtensionData) },

0 commit comments

Comments
 (0)