InternPool: fix optimization assertion failure

This commit is contained in:
Jacob Young 2024-07-10 22:55:54 -04:00
parent c79d3e4aab
commit 77810f2882

View File

@ -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(