From b780dee3e845f5c8fb8ea7b7906685d5196261a4 Mon Sep 17 00:00:00 2001 From: emekoi Date: Fri, 28 Jun 2019 18:22:02 -0500 Subject: [PATCH] initialize sections in openSelfDebugInfoWindows --- std/coff.zig | 1 - std/debug.zig | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/std/coff.zig b/std/coff.zig index ceb6050055764d69fe9878d12170f2e8e20865ab..2c65da5e9ecf38476fd3b864de8e6a39daf96322 100644 --- a/std/coff.zig +++ b/std/coff.zig @@ -145,7 +145,6 @@ pub const Coff = struct { if (self.sections.len == self.coff_header.number_of_sections) return; - self.sections = ArrayList(Section).init(self.allocator); try self.sections.ensureCapacity(self.coff_header.number_of_sections); var file_stream = self.in_file.inStream(); diff --git a/std/debug.zig b/std/debug.zig index 223f93d1ad9ca32f1dfde9755f19bc3fe4d7177b..09c89befed9c1ed913c60a51976f7dc36c3f263f 100644 --- a/std/debug.zig +++ b/std/debug.zig @@ -805,7 +805,7 @@ fn openSelfDebugInfoWindows(allocator: *mem.Allocator) !DebugInfo { .allocator = allocator, .coff_header = undefined, .pe_header = undefined, - .sections = undefined, + .sections = ArrayList(coff.Section).init(allocator), .guid = undefined, .age = undefined, }; -- 2.54.0