Browse Source

bugfix

master
CismonX 1 year ago
parent
commit
14feba7b2f
No known key found for this signature in database GPG Key ID: 315D6652268C5007
  1. 2
      src/logging.c
  2. 3
      src/vm_stack.c

2
src/logging.c

@ -109,7 +109,7 @@ u6a_err_invalid_uint(const char* stage, const char* str) {
U6A_COLD void
u6a_err_uint_not_in_range(const char* stage, uint32_t min_val, uint32_t max_val, uint32_t got) {
fprintf(stderr, "%s: [%s] Integer out of range - [%" PRIu32 ", %" PRIu32 "] expected, %" PRIu32 " given.",
fprintf(stderr, "%s: [%s] Integer out of range - [%" PRIu32 ", %" PRIu32 "] expected, %" PRIu32 " given.\n",
prog_name, stage, min_val, max_val, got);
}

3
src/vm_stack.c

@ -208,7 +208,7 @@ u6a_vm_stack_pop() {
active_stack = vs;
return false;
}
if (active_stack->refcnt-- > 1) {
if (--active_stack->refcnt > 0) {
active_stack = vm_stack_dup(active_stack);
}
if (UNLIKELY(active_stack == NULL)) {
@ -216,6 +216,7 @@ u6a_vm_stack_pop() {
return false;
};
free(vs);
--active_stack->top;
return true;
}

Loading…
Cancel
Save