diff options
author | John-Mark Bell <jmb@netsurf-browser.org> | 2021-08-13 21:33:44 +0100 |
---|---|---|
committer | John-Mark Bell <jmb@netsurf-browser.org> | 2021-08-14 01:33:23 +0100 |
commit | 5741043b16e81f9673fdef791aeb225e522c9a41 (patch) | |
tree | b392b96aab6ccc8c7c24f9c8b3f5bba5d63de02c | |
parent | a53a1e176218aba04ec13d91bbfbd103608c4eb2 (diff) | |
download | librufl-5741043b16e81f9673fdef791aeb225e522c9a41.tar.gz librufl-5741043b16e81f9673fdef791aeb225e522c9a41.tar.bz2 |
Fix bug in sparse encoding parser
Spaces are valid characters in the sparse encoding so ensure we
consume them correctly.
-rw-r--r-- | src/rufl_init.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/rufl_init.c b/src/rufl_init.c index 5da9b50..f49ceff 100644 --- a/src/rufl_init.c +++ b/src/rufl_init.c @@ -1273,8 +1273,9 @@ rufl_code rufl_init_read_encoding(font_f font, (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') || (c == '.') || (c == '_') || - (c == ';')) { - /* Printable: append */ + (c == ';') || + (c == ' ' && s[0] != '/')) { + /* Printable (or space in new-style): append */ s[n++] = c; if (n >= sizeof(s)) { /* Too long: garbage */ |