From 00f6653c2c2f6173cf30784b00f59e7256dc7f09 Mon Sep 17 00:00:00 2001 From: Justus Winter <4winter@informatik.uni-hamburg.de> Date: Tue, 29 Sep 2015 16:03:57 +0200 Subject: ddb: fix line formatting * ddb/db_output.c (db_putchar): Fix off-by-one, allowing one more character to be printed before the newline is inserted. --- ddb/db_output.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ddb/db_output.c b/ddb/db_output.c index be5319d2..a34e8070 100644 --- a/ddb/db_output.c +++ b/ddb/db_output.c @@ -146,7 +146,7 @@ db_putchar(int c) /* character to output */ cnputc(c); db_output_position++; if (db_max_width >= DB_MIN_MAX_WIDTH - && db_output_position >= db_max_width-1) { + && db_output_position >= db_max_width) { /* auto new line */ cnputc('\n'); db_output_position = 0; -- cgit v1.2.3