aboutsummaryrefslogtreecommitdiff
path: root/src/debug.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/debug.c')
-rw-r--r--src/debug.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/debug.c b/src/debug.c
index 9573bbc..567911b 100644
--- a/src/debug.c
+++ b/src/debug.c
@@ -753,7 +753,10 @@ void dbg(const char *fmt, ...)
if (is_set(flags, PRECS_FLAG))
i = precision;
- chars_written += __puts(s);
+ for (; *s && i--;) {
+ __putchar(*s++);
+ chars_written++;
+ }
fmt++;
break;