update intn usage

pull/13570/head
Subhomoy Haldar 2022-02-22 18:32:44 +05:30
parent 32239ad5b6
commit 25bfde8fd6
1 changed files with 1 additions and 1 deletions

View File

@ -110,7 +110,7 @@ pub fn string_from_set(charset string, len int) string {
mut buf := unsafe { malloc_noscan(len + 1) }
for i in 0 .. len {
unsafe {
buf[i] = charset[intn(charset.len)]
buf[i] = charset[intn(charset.len) or { 0 }]
}
}
unsafe {