another assertion

This commit is contained in:
Jarred Sumner
2022-02-11 19:04:05 -08:00
parent 8570b4a9d7
commit 71ca909008

View File

@@ -39,5 +39,8 @@ pub fn fmt(this: *StringBuilder, comptime str: string, args: anytype) string {
var buf = this.ptr.?[this.len..this.cap];
const out = std.fmt.bufPrint(buf, str, args) catch unreachable;
this.len += out.len;
assert(this.len <= this.cap);
return out;
}