hare

The Hare programming language
git clone https://git.torresjrjr.com/hare.git
Log | Files | Refs | README | LICENSE

commit 4e8aab89270a5bbfa3c3d4e300dee5c798efb2fe
parent 9e5a68a651bd8e29db0b384717ce7068bf52b235
Author: Miccah Castorina <contact@miccah.io>
Date:   Sun, 12 Dec 2021 13:39:30 -0600

net::ip::fillmask: bug fix for ipv6 masks

Signed-off-by: Miccah Castorina <contact@miccah.io>

Diffstat:
Mnet/ip/ip.ha | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/ip/ip.ha b/net/ip/ip.ha @@ -210,7 +210,7 @@ fn fmtv6(s: io::handle, a: addr6) (io::error | size) = { fn fillmask(mask: []u8, val: u8) void = { rt::memset(&mask[0], 0xFF, len(mask)); let i: int = len(mask): int - 1; - val = 32 - val; + val = len(mask): u8 * 8 - val; for (val >= 8) { mask[i] = 0x00; val -= 8;