]> git.ipfire.org Git - thirdparty/git.git/blobdiff - utf8.c
utf8: fix off-by-one wrapping of text
[thirdparty/git.git] / utf8.c
diff --git a/utf8.c b/utf8.c
index 8acbc660d31a3552a4451749353139e0dcd371bd..523a78a651c50129ab759fa319f8bfce55b2bee7 100644 (file)
--- a/utf8.c
+++ b/utf8.c
@@ -353,7 +353,7 @@ retry:
 
                c = *text;
                if (!c || isspace(c)) {
-                       if (w < width || !space) {
+                       if (w <= width || !space) {
                                const char *start = bol;
                                if (!c && text == start)
                                        return w;