parent
7db477d5ed
commit
1e80db2ee8
|
|
@ -179,7 +179,7 @@ pub fn (mut b Builder) str() string {
|
|||
// ensure_cap ensures that the buffer has enough space for at least `n` bytes by growing the buffer if necessary
|
||||
pub fn (mut b Builder) ensure_cap(n int) {
|
||||
// code adapted from vlib/builtin/array.v
|
||||
if n < 0 || n <= b.cap {
|
||||
if n <= b.cap {
|
||||
return
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue