diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2024-01-07 22:28:24 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-01-07 22:28:24 -0800 |
| commit | 3176fdc0b921b36ee7d8346ef302d0817b980cfa (patch) | |
| tree | 213a34bd1618ff429ec54efbc6652b2ee9940ff9 /src/InternPool.zig | |
| parent | 2115d7d1beeba32f975d8a032e5f5068e96e74f4 (diff) | |
| parent | 01b48e938198a206b95ed06f3a7e530e859c1cbc (diff) | |
| download | zig-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.zig | 2 |
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, |
