zig

fork of https://codeberg.org/ziglang/zig
Log | Tree | Refs | README | LICENSE

commit a1f6a08dcb91c74f31d9a2c75a73c7efb724bf92 (tree)
parent 5b8b5f2505ca63dd62f487dcd0357112f959dde7
Author: Andrew Kelley <andrew@ziglang.org>
Date:   Mon, 26 Dec 2022 16:32:25 -0700

std.crypto.Certificate.Bundle: fix 32-bit build

Diffstat:
Mlib/std/crypto/Certificate/Bundle.zig | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/std/crypto/Certificate/Bundle.zig b/lib/std/crypto/Certificate/Bundle.zig @@ -108,7 +108,7 @@ pub fn addCertsFromFile( const needed_capacity = std.math.cast(u32, decoded_size_upper_bound + size) orelse return error.CertificateAuthorityBundleTooBig; try cb.bytes.ensureUnusedCapacity(gpa, needed_capacity); - const end_reserved = cb.bytes.items.len + decoded_size_upper_bound; + const end_reserved = @intCast(u32, cb.bytes.items.len + decoded_size_upper_bound); const buffer = cb.bytes.allocatedSlice()[end_reserved..]; const end_index = try file.readAll(buffer); const encoded_bytes = buffer[0..end_index];