diff options
| author | Jacob Young <jacobly0@users.noreply.github.com> | 2024-07-10 22:55:54 -0400 |
|---|---|---|
| committer | Jacob Young <jacobly0@users.noreply.github.com> | 2024-07-10 22:56:12 -0400 |
| commit | 77810f288216ef3e35f3d0df4a04351297560a5e (patch) | |
| tree | 79d506ff8fd8834bb5771c05e550379caf480e48 /src/InternPool.zig | |
| parent | c79d3e4aab6f4fb69a1fe45ff3045a51926edfac (diff) | |
| download | zig-77810f288216ef3e35f3d0df4a04351297560a5e.tar.gz zig-77810f288216ef3e35f3d0df4a04351297560a5e.zip | |
InternPool: fix optimization assertion failure
Diffstat (limited to 'src/InternPool.zig')
| -rw-r--r-- | src/InternPool.zig | 3 |
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( |
