mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
save a byteptr memory, add tests
This commit is contained in:

committed by
Alexander Medvednikov

parent
045d480c8c
commit
b40ad7c83f
@ -769,7 +769,7 @@ pub fn (s []string) join_lines() string {
|
||||
pub fn (s string) reverse() string {
|
||||
mut res := string {
|
||||
len: s.len
|
||||
str: malloc(s.len + 1)
|
||||
str: malloc(s.len)
|
||||
}
|
||||
|
||||
for i := s.len - 1; i >= 0; i-- {
|
||||
|
Reference in New Issue
Block a user