From 6ecd0010931a988792e672e1fe0a1192fca7b002 Mon Sep 17 00:00:00 2001 From: "Jason S. Ninneman" Date: Mon, 19 Jun 2017 14:49:15 -0700 Subject: [PATCH] Fix typo and compiler warning. --- advent.h | 2 +- misc.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/advent.h b/advent.h index 1a6ab08..2b7f761 100644 --- a/advent.h +++ b/advent.h @@ -90,7 +90,7 @@ extern bool oldstyle, editline, prompt; extern void* xmalloc(size_t size); extern char* xstrdup(const char*); extern void packed_to_token(long, char token[]); -extern void token_to_packed(char token[], long); +extern void token_to_packed(char token[], long*); extern void speak(const char*); extern bool wordeq(token_t, token_t); extern bool wordempty(token_t); diff --git a/misc.c b/misc.c index 64c05ce..29846e2 100644 --- a/misc.c +++ b/misc.c @@ -57,7 +57,7 @@ void token_to_packed(char token[6], long* packed) { if (token[4 - i] == '\0') continue; - char mapped = ascii_to_advent[token[4 - i]]; + char mapped = ascii_to_advent[(int) token[4 - i]]; *packed |= (mapped << (6 * i)); } } -- 2.31.1