| ... | @@ -822,7 +822,7 @@ fn runCommand( | ... | @@ -822,7 +822,7 @@ fn runCommand( |
| 822 | .zig_test => { | 822 | .zig_test => { |
| 823 | const prefix: []const u8 = p: { | 823 | const prefix: []const u8 = p: { |
| 824 | if (result.stdio.test_metadata) |tm| { | 824 | if (result.stdio.test_metadata) |tm| { |
| 825 | if (tm.next_index <= tm.names.len) { | 825 | if (tm.next_index > 0 and tm.next_index <= tm.names.len) { |
| 826 | const name = tm.testName(tm.next_index - 1); | 826 | const name = tm.testName(tm.next_index - 1); |
| 827 | break :p b.fmt("while executing test '{s}', ", .{name}); | 827 | break :p b.fmt("while executing test '{s}', ", .{name}); |
| 828 | } | 828 | } |