Make sure casting to unsigned types performs zero-extension

Closes #2696
This commit is contained in:
ayazhafiz 2022-03-10 17:39:37 -06:00
parent a412cddec2
commit a90bba3d1d
9 changed files with 67 additions and 16 deletions

View file

@ -179,7 +179,7 @@ pub fn str_number_of_bytes<'a, 'ctx, 'env>(
// cast to the appropriate usize of the current build
env.builder
.build_int_cast(length, env.ptr_int(), "len_as_usize")
.build_int_cast_sign_flag(length, env.ptr_int(), false, "len_as_usize")
}
/// Str.startsWith : Str, Str -> Bool