Fix str::concat

This commit is contained in:
Christoffer Lerno
2022-12-23 14:06:02 +01:00
parent 03cdc8e3b1
commit fe9ace713b

View File

@@ -312,7 +312,7 @@ fn char[] tconcat(char[] s1, char[] s2)
mem::copy(str, s1.ptr, s1_len);
mem::copy(str + s1_len, s2.ptr, s2.len);
str[full_len] = 0;
return str[..full_len];
return str[:full_len];
}
fn char[] concat(char[] s1, char[] s2)
@@ -323,7 +323,7 @@ fn char[] concat(char[] s1, char[] s2)
mem::copy(str, s1.ptr, s1_len);
mem::copy(str + s1_len, s2.ptr, s2.len);
str[full_len] = 0;
return str[..full_len];
return str[:full_len];
}
fn char[] ZString.as_str(ZString str)