mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
v/checker.v: disallow pointer arithmetic for InfixExpr outside unsafe {} (#5640)
This commit is contained in:
@ -39,10 +39,10 @@ fn opt_ok2(data voidptr, mut option &OptionBase, size int) {
|
||||
*option = OptionBase {
|
||||
ok: true
|
||||
}
|
||||
}
|
||||
|
||||
// use ecode to get the end of OptionBase and then memcpy into it
|
||||
C.memcpy(byteptr(&option.ecode) + sizeof(int), data, size)
|
||||
// use ecode to get the end of OptionBase and then memcpy into it
|
||||
C.memcpy(byteptr(&option.ecode) + sizeof(int), data, size)
|
||||
}
|
||||
}
|
||||
|
||||
// Old option type used for bootstrapping
|
||||
|
Reference in New Issue
Block a user