Fixed a few bugs preventing basic functions

Worked on extraction, including creating DataReader
Added proper access to id, fragment, and export tables
This commit is contained in:
Caleb J. Gardner
2026-01-28 06:50:26 -06:00
parent 5d4e7b1435
commit 2c392cf250
9 changed files with 276 additions and 37 deletions
+1 -1
View File
@@ -38,7 +38,7 @@ pub fn readDir(alloc: std.mem.Allocator, rdr: *Reader, size: u32) ![]Entry {
try rdr.readSliceEndian(Header, @ptrCast(&hdr), .little);
cur_red += @sizeOf(Header);
try out.ensureUnusedCapacity(alloc, hdr.num + 1);
for (0..hdr.num + 1) |_| {
for (0..hdr.count + 1) |_| {
try rdr.readSliceEndian(RawEntry, @ptrCast(&raw), .little);
const name = try alloc.alloc(u8, raw.name_size + 1);
try rdr.readSliceEndian(u8, name, .little);