This commit is contained in:
CismonX 2020-04-21 11:09:17 +08:00
parent 000713149e
commit 14feba7b2f
No known key found for this signature in database
GPG Key ID: 315D6652268C5007
2 changed files with 3 additions and 2 deletions

View File

@ -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);
}

View File

@ -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;
}