aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--asm/parser.c4
-rw-r--r--vm/runtime.c4
2 files changed, 3 insertions, 5 deletions
diff --git a/asm/parser.c b/asm/parser.c
index 9d8317d..62f36d8 100644
--- a/asm/parser.c
+++ b/asm/parser.c
@@ -79,9 +79,7 @@ perr_t parse_word(token_t token, word *ret)
if (is_negative)
{
char *end = NULL;
- // TODO: Make a standardised type of the same size as word in
- // base.h
- int64_t i = strtoll(token.str, &end, 0);
+ s_word i = strtoll(token.str, &end, 0);
if (!(end && end[0] == '\0'))
return PERR_NOT_A_NUMBER;
else if (errno == ERANGE)
diff --git a/vm/runtime.c b/vm/runtime.c
index 82886b8..536ac6d 100644
--- a/vm/runtime.c
+++ b/vm/runtime.c
@@ -197,7 +197,7 @@ err_t vm_execute(vm_t *vm)
printf("0x%x", datum.as_byte);
break;
case TYPE_INT: {
- int32_t i = 0;
+ s_hword i = 0;
memcpy(&i, &datum.as_hword, HWORD_SIZE);
printf("%" PRId32, i);
break;
@@ -206,7 +206,7 @@ err_t vm_execute(vm_t *vm)
printf("%" PRIu32, datum.as_hword);
break;
case TYPE_LONG: {
- int64_t i = 0;
+ s_word i = 0;
memcpy(&i, &datum.as_word, WORD_SIZE);
printf("%" PRId64, i);
break;