Skip to content

Commit e010b6a

Browse files
committed
feat(core): limit max marker to 0xD7FF 🙀
- to avoid mismatched surrogate pairs in markers For: #9119
1 parent c23303e commit e010b6a

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

core/include/ldml/keyboardprocessor_ldml.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,10 +93,10 @@
9393
#define LDML_LENGTH_VARS_ITEM 0x10
9494
#define LDML_LENGTH_VKEY 0xC
9595
#define LDML_LENGTH_VKEY_ITEM 0x8
96-
#define LDML_MARKER_ANY_INDEX 0xFFFE
96+
#define LDML_MARKER_ANY_INDEX 0xD7FF
9797
#define LDML_MARKER_CODE 0x8
98-
#define LDML_MARKER_MAX_COUNT 0xFFFC
99-
#define LDML_MARKER_MAX_INDEX 0xFFFD
98+
#define LDML_MARKER_MAX_COUNT 0xD7FD
99+
#define LDML_MARKER_MAX_INDEX 0xD7FE
100100
#define LDML_MARKER_MIN_INDEX 0x1
101101
#define LDML_META_SETTINGS_FALLBACK_OMIT 0x1
102102
#define LDML_META_SETTINGS_TRANSFORMFAILURE_OMIT 0x2

core/include/ldml/keyboardprocessor_ldml.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -622,7 +622,7 @@ class Constants {
622622
/** minimum usable marker index */
623623
readonly marker_min_index = 0x0001;
624624
/** index value referring to the 'any' marker match */
625-
readonly marker_any_index = 0xFFFE;
625+
readonly marker_any_index = 0xD7FF;
626626
/** maximum marker index prior to the 'any' value */
627627
readonly marker_max_index = this.marker_any_index - 1;
628628
/** maximum count of markers (not including 'any') */

0 commit comments

Comments
 (0)