Skip to content

Commit

Permalink
Fix error message in printf() (#378)
Browse files Browse the repository at this point in the history
  • Loading branch information
vtereshkov committed Apr 14, 2024
1 parent 0546b5c commit d607e65
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/umka_vm.c
Original file line number Diff line number Diff line change
Expand Up @@ -1593,7 +1593,8 @@ static FORCE_INLINE void doBuiltinPrintf(Fiber *fiber, HeapPages *pages, bool co
!(typeKindIntegerOrEnum(type->kind) && typeKindIntegerOrEnum(expectedTypeKind)) &&
!(typeKindReal(type->kind) && typeKindReal(expectedTypeKind)))
{
error->runtimeHandler(error->context, VM_RUNTIME_ERROR, "Incompatible types %s and %s in printf()", typeKindSpelling(expectedTypeKind), typeKindSpelling(type->kind));
char typeBuf[DEFAULT_STR_LEN + 1];
error->runtimeHandler(error->context, VM_RUNTIME_ERROR, "Incompatible types %s and %s in printf()", typeKindSpelling(expectedTypeKind), typeSpelling(type, typeBuf));
}

// Check overflow
Expand Down

0 comments on commit d607e65

Please sign in to comment.