aboutsummaryrefslogtreecommitdiff
path: root/lib/std/debug.zig
diff options
context:
space:
mode:
authorAuguste Rame <Auguste.rame@gmail.com>2020-04-10 11:49:50 -0400
committerGitHub <noreply@github.com>2020-04-10 11:49:50 -0400
commitdf14578c9d3c7f455c7710ecc9bafe56eb0ec826 (patch)
tree2501b90c7263cf662f64190e43aa66ba307eb15f /lib/std/debug.zig
parent116c76cf82cd9e7ea3018e36dd9756f2f063143d (diff)
parent4871345545ec9655a14d0bfe32668eda210953f7 (diff)
downloadzig-df14578c9d3c7f455c7710ecc9bafe56eb0ec826.tar.gz
zig-df14578c9d3c7f455c7710ecc9bafe56eb0ec826.zip
Merge branch 'master' into nameless-fields
Diffstat (limited to 'lib/std/debug.zig')
-rw-r--r--lib/std/debug.zig4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/std/debug.zig b/lib/std/debug.zig
index 9e14d132a8..5a8f556517 100644
--- a/lib/std/debug.zig
+++ b/lib/std/debug.zig
@@ -1213,7 +1213,7 @@ pub const DebugInfo = struct {
const obj_di = try self.allocator.create(ModuleDebugInfo);
errdefer self.allocator.destroy(obj_di);
- obj_di.* = openCoffDebugInfo(self.allocator, name_buffer[0..:0]) catch |err| switch (err) {
+ obj_di.* = openCoffDebugInfo(self.allocator, name_buffer[0 .. len + 4 :0]) catch |err| switch (err) {
error.FileNotFound => return error.MissingDebugInfo,
else => return err,
};
@@ -1478,7 +1478,7 @@ pub const ModuleDebugInfo = switch (builtin.os.tag) {
var coff_section: *coff.Section = undefined;
const mod_index = for (self.sect_contribs) |sect_contrib| {
- if (sect_contrib.Section > self.coff.sections.len) continue;
+ if (sect_contrib.Section > self.coff.sections.items.len) continue;
// Remember that SectionContribEntry.Section is 1-based.
coff_section = &self.coff.sections.span()[sect_contrib.Section - 1];