mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
checker: disallow address of array and map index outside unsafe (#6557)
This commit is contained in:
@@ -160,7 +160,9 @@ pub fn (d Dec32) get_string_32(neg bool, i_n_digit int, i_pad_digit int) string
|
||||
x++
|
||||
}
|
||||
*/
|
||||
return tos(byteptr(&buf[0]), i)
|
||||
return unsafe {
|
||||
tos(byteptr(&buf[0]), i)
|
||||
}
|
||||
}
|
||||
|
||||
fn f32_to_decimal_exact_int(i_mant u32, exp u32) (Dec32,bool) {
|
||||
|
@@ -190,7 +190,9 @@ fn (d Dec64) get_string_64(neg bool, i_n_digit int, i_pad_digit int) string {
|
||||
x++
|
||||
}
|
||||
*/
|
||||
return tos(byteptr(&buf[0]), i)
|
||||
return unsafe {
|
||||
tos(byteptr(&buf[0]), i)
|
||||
}
|
||||
}
|
||||
|
||||
fn f64_to_decimal_exact_int(i_mant u64, exp u64) (Dec64, bool) {
|
||||
|
Reference in New Issue
Block a user