From: Jason S. Ninneman Date: Mon, 19 Jun 2017 21:49:15 +0000 (-0700) Subject: Fix typo and compiler warning. X-Git-Tag: 1.1~204^2 X-Git-Url: https://jxself.org/git/?p=open-adventure.git;a=commitdiff_plain;h=6ecd0010931a988792e672e1fe0a1192fca7b002 Fix typo and compiler warning. --- 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)); } }