commit 7427a415776537506435c7d047f8555fb426b811
parent e9624f20e1d1cc98dcafb9e07701c8634bac630a
Author: Drew DeVault <sir@cmpwn.com>
Date: Wed, 23 Jun 2021 20:21:09 -0400
net::dial::resolve: correct off-by-one error
Signed-off-by: Drew DeVault <sir@cmpwn.com>
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/dial/resolve.ha b/net/dial/resolve.ha
@@ -21,7 +21,7 @@ export fn resolve(
* => 0u16,
},
i: size => {
- const sub = strings::sub(addr, i, strings::end);
+ const sub = strings::sub(addr, i + 1, strings::end);
addr = strings::sub(addr, 0, i);
match (strconv::stou16(sub)) {
u: u16 => u,