From b270d88427c009066f2ebe019b81d49d06477906 Mon Sep 17 00:00:00 2001
From: llmII <dev@amlegion.org>
Date: Mon, 6 Sep 2021 10:12:36 -0500
Subject: [PATCH] More off by one error fixes

---
 src/core/net.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/core/net.c b/src/core/net.c
index 40940487..9de2a00d 100644
--- a/src/core/net.c
+++ b/src/core/net.c
@@ -303,9 +303,9 @@ static struct addrinfo *janet_get_addrinfo(Janet *argv, int32_t offset, int sock
         /* when is_bind is set, we're performing a connect, but wanting to
          * specify from where we connect, and in general don't care about a
          * port */
-        int32_t current_offset = 3;
-        if (janet_checktype(argv[2], JANET_KEYWORD)) {
-           current_offset = 4;
+        int32_t current_offset = 2;
+        if (janet_checktype(argv[current_offset], JANET_KEYWORD)) {
+           current_offset++;
         }
         host = (char *)janet_getcstring(argv, current_offset);
         port = NULL;