Fix line break of surrogate characters
authorBehdad Esfahbod <behdad@behdad.org>
Sun, 2 Dec 2012 15:27:52 +0000 (17:27 +0200)
committerBehdad Esfahbod <behdad@behdad.org>
Sun, 2 Dec 2012 16:09:40 +0000 (18:09 +0200)
pango/break.c

index ca1eb43..e8a97c1 100644 (file)
@@ -986,7 +986,8 @@ pango_default_break (const gchar   *text,
              break;
 
            case G_UNICODE_BREAK_SURROGATE:
-             g_assert_not_reached ();
+             /* Undefined according to UTR#14, but ALLOWED in test data. */
+             break_op = BREAK_ALLOWED;
              break;
 
            default:
@@ -1022,7 +1023,8 @@ pango_default_break (const gchar   *text,
                  break;
 
                case G_UNICODE_BREAK_SURROGATE:
-                 g_assert_not_reached ();
+                 /* Undefined according to UTR#14, but ALLOWED in test data. */
+                 break_op = BREAK_ALLOWED;
                  break;
 
                /* Hangul additions are from Unicode 4.1 UAX#14 */