aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/InternPool.zig3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/InternPool.zig b/src/InternPool.zig
index 258bc72a6d..2b21b25a1d 100644
--- a/src/InternPool.zig
+++ b/src/InternPool.zig
@@ -10969,7 +10969,8 @@ const GlobalErrorSet = struct {
/// Not thread-safe, may only be called from the main thread.
pub fn getNamesFromMainThread(ges: *const GlobalErrorSet) []const NullTerminatedString {
- return ges.shared.names.view().items(.@"0")[0..ges.mutate.list.len];
+ const len = ges.mutate.list.len;
+ return if (len > 0) ges.shared.names.view().items(.@"0")[0..len] else &.{};
}
fn getErrorValue(