1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

cgen: more errors fixed

This commit is contained in:
Alexander Medvednikov
2020-03-11 23:22:40 +01:00
parent e0c85f87ae
commit a182b5c531
3 changed files with 40 additions and 12 deletions

View File

@@ -110,9 +110,9 @@ pub fn (a string) clone() string {
str: malloc(a.len + 1)
}
for i in 0..a.len {
b[i] = a[i]
b.str[i] = a.str[i]
}
b[a.len] = `\0`
b.str[a.len] = `\0`
return b
}
@@ -280,7 +280,7 @@ val_idx:rep_i}
}
// Rep doesnt start here, just copy
else {
b[b_i] = s[i]
b[b_i] = s.str[i]
b_i++
}
}