aboutsummaryrefslogtreecommitdiff
path: root/puny.c
diff options
context:
space:
mode:
authorOmar Polo <op@omarpolo.com>2021-01-29 17:26:56 +0000
committerOmar Polo <op@omarpolo.com>2021-01-29 17:26:56 +0000
commit4a3ab6092855f7297ed1b29e89e3423fbece4e5b (patch)
treeccb53ed6907f9fa7238dd9494a381beb1d6fd48e /puny.c
parent117ac52cdd4f45bd5402686b9d4f1d91c32cb1dd (diff)
const-ify var + missing argument
Diffstat (limited to 'puny.c')
-rw-r--r--puny.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/puny.c b/puny.c
index 8bb66c1..b28065c 100644
--- a/puny.c
+++ b/puny.c
@@ -91,7 +91,7 @@ digit_value(char c)
}
static int
-insert(char *out, size_t len, int codepoint, size_t i, char **err)
+insert(char *out, size_t len, int codepoint, size_t i, const char **err)
{
int l;
char *t;
@@ -207,7 +207,7 @@ decode(const char *str, char *out, size_t len, const char **err)
n += i / (numpoints+1); /* fail on overflow */
i = i % (numpoints+1);
- if (!insert(out, len, n, i))
+ if (!insert(out, len, n, i, err))
return 0;
numpoints++;
++i;