string: Properly null-terminate repeated string
parent
802da8f31d
commit
a4d2633a33
|
@ -1021,5 +1021,6 @@ pub fn (s string) repeat(count int) string {
|
||||||
ret[i*s.len + j] = s[j]
|
ret[i*s.len + j] = s[j]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
ret[s.len * count] = 0
|
||||||
return string(ret)
|
return string(ret)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue