Co-authored-by: JalonSolov <JalonSolov@gmail.com>
pull/13755/head
Hunam 2022-03-17 20:50:14 +01:00 committed by GitHub
parent 7db477d5ed
commit 1e80db2ee8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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
}