fix some bugs with -disable-assert

This commit is contained in:
Laytan Laats
2024-07-16 18:44:18 +02:00
parent 03426175ae
commit 28fac62a02
6 changed files with 15 additions and 9 deletions
+2 -1
View File
@@ -351,7 +351,8 @@ _marshal_into_encoder :: proc(e: Encoder, v: any, ti: ^runtime.Type_Info) -> (er
builder := strings.builder_from_slice(res[:])
e.writer = strings.to_stream(&builder)
assert(_encode_u64(e, u64(len(str)), .Text) == nil)
err := _encode_u64(e, u64(len(str)), .Text)
assert(err == nil)
res[9] = u8(len(builder.buf))
assert(res[9] < 10)
return