Commit fbb0c8d639

emekoi <emekankurumeh@outlook.com>
2019-06-29 00:59:34
fixed debug info on windows
1 parent 4b7e04f
Changed files (1)
std/coff.zig
@@ -142,10 +142,11 @@ pub const Coff = struct {
     }
 
     pub fn loadSections(self: *Coff) !void {
-        if (self.sections.len != 0)
+        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();
         const in = &file_stream.stream;