aboutsummaryrefslogtreecommitdiff
path: root/src/InternPool.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2024-01-07 22:28:24 -0800
committerGitHub <noreply@github.com>2024-01-07 22:28:24 -0800
commit3176fdc0b921b36ee7d8346ef302d0817b980cfa (patch)
tree213a34bd1618ff429ec54efbc6652b2ee9940ff9 /src/InternPool.zig
parent2115d7d1beeba32f975d8a032e5f5068e96e74f4 (diff)
parent01b48e938198a206b95ed06f3a7e530e859c1cbc (diff)
downloadzig-3176fdc0b921b36ee7d8346ef302d0817b980cfa.tar.gz
zig-3176fdc0b921b36ee7d8346ef302d0817b980cfa.zip
Merge pull request #18470 from castholm/typeInfo-sentinels
Make `@typeInfo` return null-terminated strings
Diffstat (limited to 'src/InternPool.zig')
-rw-r--r--src/InternPool.zig2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/InternPool.zig b/src/InternPool.zig
index 2e690652a3..0844e0f7a5 100644
--- a/src/InternPool.zig
+++ b/src/InternPool.zig
@@ -5315,7 +5315,7 @@ pub fn get(ip: *InternPool, gpa: Allocator, key: Key) Allocator.Error!Index {
try ip.extra.ensureUnusedCapacity(
gpa,
- @typeInfo(Tag.Aggregate).Struct.fields.len + @as(usize, @intCast(len_including_sentinel)),
+ @typeInfo(Tag.Aggregate).Struct.fields.len + @as(usize, @intCast(len_including_sentinel + 1)),
);
ip.items.appendAssumeCapacity(.{
.tag = .aggregate,