diff --git a/abstract-machine/klib/src/printf.c b/abstract-machine/klib/src/printf.c index 04a5757..e760c3f 100644 --- a/abstract-machine/klib/src/printf.c +++ b/abstract-machine/klib/src/printf.c @@ -87,7 +87,7 @@ int rvsnprintf(char* out, size_t n, const char* fmt, va_list ap) { n --; } *out = '\0'; - return ret - n; + return ret - n + 1; } #endif