]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
* grub-core/normal/term.c (print_ucs4_terminal): Don't try to put the
authorVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Fri, 8 Apr 2011 12:25:44 +0000 (14:25 +0200)
committerVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Fri, 8 Apr 2011 12:25:44 +0000 (14:25 +0200)
word on new line if it's too long anyway. Fixes a hang.

ChangeLog
grub-core/normal/term.c

index fdce6dfe0104087bc6bb6a13a05507d605d27b61..1b9d768ce8466a86a84df1ef8019f9d925c61210 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2011-04-08  Vladimir Serbinenko  <phcoder@gmail.com>
+
+       * grub-core/normal/term.c (print_ucs4_terminal): Don't try to put the
+       word on new line if it's too long anyway. Fixes a hang.
+
 2011-04-08  Vladimir Serbinenko  <phcoder@gmail.com>
 
        * include/grub/util/raid.h (grub_util_raid_getmembers): Make argument
index a1aa3d783758c4316cbae3b6eb7424fba9caa6da..9c4b491f5008cc8e6e0a979ebc7d2d05b7400830 100644 (file)
@@ -552,7 +552,7 @@ print_ucs4_terminal (const grub_uint32_t * str,
          if (line_width > max_width && last_space > line_start)
            ptr = last_space;
          else if (line_width > max_width 
-                  && line_start == str && startwidth != 0)
+                  && line_start == str && line_width - lastspacewidth < max_width - 5)
            {
              ptr = str;
              lastspacewidth = startwidth;