diff options
author | kdx <kikoodx@paranoici.org> | 2023-04-13 13:11:07 +0200 |
---|---|---|
committer | kdx <kikoodx@paranoici.org> | 2023-04-13 13:11:07 +0200 |
commit | d0d7fd46e8080cb5945fce4e48a0ab7634197d50 (patch) | |
tree | 82f635829a299914e2cdb06121460ab1a4f365cf | |
parent | 12789bcc949a60ba59cee1d21fed12c7d699aadb (diff) | |
download | orga-d0d7fd46e8080cb5945fce4e48a0ab7634197d50.tar.gz |
fast
-rw-r--r-- | src/main.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -107,7 +107,7 @@ opcmp(const char *s0, const char *s1) static void write_opcode(const char *s) { - for (int i = 0; i < sizeof(ops) / sizeof(ops[0]); i++) { + for (unsigned i = 0; i < sizeof(ops) / sizeof(ops[0]); i++) { if (opcmp(s, ops[i])) { write_short(i); return; @@ -130,10 +130,10 @@ write_literal(const char *s) fprintf(stderr, "invalid literal '%s'\n", s); exit(fail()); } - write_short((hextable[s[0]] * 0x1000) | - (hextable[s[1]] * 0x100) | - (hextable[s[2]] * 0x10) | - (hextable[s[3]])); + write_short((hextable[(int)s[0]] * 0x1000) | + (hextable[(int)s[1]] * 0x100) | + (hextable[(int)s[2]] * 0x10) | + (hextable[(int)s[3]])); } static void |