mirror of
https://github.com/odin-lang/Odin.git
synced 2026-02-12 06:18:39 +00:00
Merge pull request #6089 from Neirokan/ipv4_to_ipv6_fix
core/net: fix `map_to_ip6` offset
This commit is contained in:
@@ -495,8 +495,8 @@ map_to_ip6 :: proc(addr: Address) -> Address {
|
||||
addr4 := addr.(IP4_Address)
|
||||
addr4_u16 := transmute([2]u16be) addr4
|
||||
addr6: IP6_Address
|
||||
addr6[4] = 0xffff
|
||||
copy(addr6[5:], addr4_u16[:])
|
||||
addr6[5] = 0xffff
|
||||
copy(addr6[6:], addr4_u16[:])
|
||||
return addr6
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user