diff options
| author | Mattias Andrée <m@maandree.se> | 2025-12-21 14:08:57 +0100 |
|---|---|---|
| committer | Mattias Andrée <m@maandree.se> | 2025-12-21 14:13:45 +0100 |
| commit | 095193a9905caff27509a299d895d399d42c06aa (patch) | |
| tree | 48b1bcf860866029d9081cf9ecd72388658cfbb9 /Scripts.parse.c | |
| parent | Add range print functions (diff) | |
| download | libcmap-095193a9905caff27509a299d895d399d42c06aa.tar.gz libcmap-095193a9905caff27509a299d895d399d42c06aa.tar.bz2 libcmap-095193a9905caff27509a299d895d399d42c06aa.tar.xz | |
Fix truncation issue in libcmap_sprintf_range, and add LIBCMAP_ULTIMATE_CODEPOINT and LIBCMAP_UNIVERSE_RANGE
Signed-off-by: Mattias Andrée <m@maandree.se>
Diffstat (limited to 'Scripts.parse.c')
| -rw-r--r-- | Scripts.parse.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Scripts.parse.c b/Scripts.parse.c index d5d167b..60ddfe9 100644 --- a/Scripts.parse.c +++ b/Scripts.parse.c @@ -79,13 +79,13 @@ parse_line(char *text, size_t lineno) } high = low = strtoul(text, &text, 16); - if (errno || low > 0x10FFFFUL) + if (errno || low > ULTIMATE_CODEPOINT) goto malformat; if (text[0] == '.' && text[1] == '.') { if (!isxdigit(text[2])) goto malformat; high = strtoul(&text[2], &text, 16); - if (errno || high > 0x10FFFFUL || high < low) + if (errno || high > ULTIMATE_CODEPOINT || high < low) goto malformat; } while (isspace(*text)) @@ -218,7 +218,7 @@ output(void) } nranges = 1U; ranges[0].low = 0; - ranges[0].high = 0x10FFFF; + ranges[0].high = ULTIMATE_CODEPOINT; for (i = 0; i < nscripts; i++) { scripts[i].nranges = join_ranges(scripts[i].ranges, scripts[i].nranges); |
