Fix typo and compiler warning.

This commit is contained in:
Jason S. Ninneman 2017-06-19 14:49:15 -07:00
parent ba64c57eb0
commit 6ecd001093
2 changed files with 2 additions and 2 deletions

View file

@ -90,7 +90,7 @@ extern bool oldstyle, editline, prompt;
extern void* xmalloc(size_t size); extern void* xmalloc(size_t size);
extern char* xstrdup(const char*); extern char* xstrdup(const char*);
extern void packed_to_token(long, char token[]); 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 void speak(const char*);
extern bool wordeq(token_t, token_t); extern bool wordeq(token_t, token_t);
extern bool wordempty(token_t); extern bool wordempty(token_t);

2
misc.c
View file

@ -57,7 +57,7 @@ void token_to_packed(char token[6], long* packed)
{ {
if (token[4 - i] == '\0') if (token[4 - i] == '\0')
continue; continue;
char mapped = ascii_to_advent[token[4 - i]]; char mapped = ascii_to_advent[(int) token[4 - i]];
*packed |= (mapped << (6 * i)); *packed |= (mapped << (6 * i));
} }
} }