]> Savannah Git Hosting - gnulib.git/commitdiff
unilbrk: Fix handling of unassigned code points (regression yesterday).
authorBruno Haible <bruno@clisp.org>
Sat, 14 Sep 2024 19:13:20 +0000 (21:13 +0200)
committerBruno Haible <bruno@clisp.org>
Sat, 14 Sep 2024 21:33:30 +0000 (23:33 +0200)
* lib/unilbrk/lbrktables.h (unilbrkprop_lookup): Correct the default
return value.

ChangeLog
lib/unilbrk/lbrktables.h

index 2b35fe2905eafcc596051bdf2d31498104dfbe91..66d54669f5c8f19c179b7565601421c25f68eef0 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2024-09-14  Bruno Haible  <bruno@clisp.org>
+
+       unilbrk: Fix handling of unassigned code points (regression yesterday).
+       * lib/unilbrk/lbrktables.h (unilbrkprop_lookup): Correct the default
+       return value.
+
 2024-09-14  Bruno Haible  <bruno@clisp.org>
 
        unilbrk/tables: Fix table (regression yesterday).
index e8d0719d1acbc2dae2397bd9c05a79bc0bd9029f..865bea1690a7f12f46ecb0c1598d7d5f88acd0d5 100644 (file)
@@ -96,6 +96,13 @@ enum
 
 #include "lbrkprop1.h"
 
+/* Combining prop and ea to a table entry.  */
+#define PROP_EA(prop,ea) (((prop) << 1) | (ea))
+
+/* Splitting a table entry into prop and ea.  */
+#define PROP(entry) ((entry) >> 1)
+#define EA(entry) ((entry) & 1)
+
 /* Returns (prop << 1) | ea, where
      - prop is the line breaking property,
      - ea is the EastAsian property (1 bit)
@@ -118,16 +125,9 @@ unilbrkprop_lookup (ucs4_t uc)
             }
         }
     }
-  return LBP_XX;
+  return PROP_EA (LBP_XX, 0);
 }
 
-/* Splitting a table entry into prop and ea.  */
-#define PROP(entry) ((entry) >> 1)
-#define EA(entry) ((entry) & 1)
-
-/* Combining prop and ea to a table entry.  */
-#define PROP_EA(prop,ea) (((prop) << 1) | (ea))
-
 
 /* Table indexed by two line breaking classifications.  */
 #define D 1  /* direct break opportunity, empty in table 7.3 of UTR #14 */