hare

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

commit 37173d180108300d4c8768322fd03bfcfde70a17
parent 54db9009dfa61b5c6793c87816bb61c5bc84dab7
Author: Drew DeVault <sir@cmpwn.com>
Date:   Thu, 24 Jun 2021 16:28:39 -0400

net::dial::resolve: fix IP parsing

Signed-off-by: Drew DeVault <sir@cmpwn.com>

Diffstat:
Mnet/dial/resolve.ha | 7++++++-
1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/net/dial/resolve.ha b/net/dial/resolve.ha @@ -55,7 +55,12 @@ export fn resolve( fn resolve_addr(addr: str) ([]ip::addr | error) = { match (ip::parse(addr)) { - addr: ip::addr => alloc([addr]), + addr: ip::addr => { + // XXX: harec bug prevents just alloc'ing this + let addrs: []ip::addr = []; + append(addrs, addr); + return addrs; + }, ip::invalid => void, };