diff --git a/lib/std/crypto/codecs/asn1/der/Encoder.zig b/lib/std/crypto/codecs/asn1/der/Encoder.zig index 9a8b58d64a7e69ae5ef2803f63c4dfdb13ea8bf1..7f1913df628d7caace906fe905b423a60d9a8300 100644 --- a/lib/std/crypto/codecs/asn1/der/Encoder.zig +++ b/lib/std/crypto/codecs/asn1/der/Encoder.zig @@ -43,7 +43,7 @@ fn anyTag(self: *Encoder, tag_: Tag, val: anytype) !void { const is_default = if (f_attrs.@"comptime") false else if (f_attrs.defaultValue(f_type)) |default_val| brk: { break :brk std.mem.eql(u8, std.mem.asBytes(&default_val), std.mem.asBytes(&field_val)); } else false; - const is_null_optional = if (@typeInfo(f.type) == .optional) field_val == null else false; + const is_null_optional = if (@typeInfo(f_type) == .optional) field_val == null else false; if (!is_default and !is_null_optional) { const start2 = self.buffer.data.len;