| author | |
| committer | |
| log | fbb0c8d639ec205848f03099413c57f686c2d05d |
| tree | bd832f79c01d8756e3da8d26017ea516d814d7b9 |
| parent | 4b7e04f75aef8da6d2f95977cee69cd9b3b440a5 |
1 files changed, 2 insertions(+), 1 deletions(-)
std/coff.zig+2-1| ... | ... | @@ -142,10 +142,11 @@ pub const Coff = struct { |
| 142 | 142 | } |
| 143 | 143 | |
| 144 | 144 | pub fn loadSections(self: *Coff) !void { |
| 145 | if (self.sections.len != 0) | |
| 145 | if (self.sections.len == self.coff_header.number_of_sections) | |
| 146 | 146 | return; |
| 147 | 147 | |
| 148 | 148 | self.sections = ArrayList(Section).init(self.allocator); |
| 149 | try self.sections.ensureCapacity(self.coff_header.number_of_sections); | |
| 149 | 150 | |
| 150 | 151 | var file_stream = self.in_file.inStream(); |
| 151 | 152 | const in = &file_stream.stream; |