aboutsummaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/main.c b/src/main.c
index 8bed673cd..638c60a50 100644
--- a/src/main.c
+++ b/src/main.c
@@ -501,6 +501,10 @@ static void warnf(struct Configurable *config, const char *fmt, ...)
while(!ISSPACE(ptr[cut]) && cut) {
cut--;
}
+ if(0 == cut)
+ /* not a single cutting position was found, just cut it at the
+ max text width then! */
+ cut = WARN_TEXTWIDTH-1;
fwrite(ptr, cut + 1, 1, config->errors);
fputs("\n", config->errors);