diff options
author | Russ Cox <rsc@swtch.com> | 2016-01-22 06:50:38 -0500 |
---|---|---|
committer | Russ Cox <rsc@swtch.com> | 2016-01-22 11:52:32 +0000 |
commit | c499ab911db8afefa197988c796331697c06219b (patch) | |
tree | ae941e4287e67aa293eb4a16a65833bf889023fc /src/cmd/fontsrv | |
parent | 009b0cb5eb340b8bc3268bfaeb86abfeffdc1b1c (diff) | |
download | plan9port-c499ab911db8afefa197988c796331697c06219b.tar.gz plan9port-c499ab911db8afefa197988c796331697c06219b.tar.bz2 plan9port-c499ab911db8afefa197988c796331697c06219b.zip |
fontsrv: do not try to look up surrogate pairs
Change-Id: Ib0a680e123ba02b41e1029e356543c24e8b4647e
Reviewed-on: https://plan9port-review.googlesource.com/1430
Reviewed-by: Russ Cox <rsc@swtch.com>
Diffstat (limited to 'src/cmd/fontsrv')
-rw-r--r-- | src/cmd/fontsrv/osx.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/cmd/fontsrv/osx.c b/src/cmd/fontsrv/osx.c index 2c88fd55..d1a31837 100644 --- a/src/cmd/fontsrv/osx.c +++ b/src/cmd/fontsrv/osx.c @@ -26,6 +26,8 @@ mapUnicode(int i) case '`': return 0x2018; } + if(0xd800 <= i && i < 0xe0000) // surrogate pairs, will crash OS X libraries! + return 0xfffd; return i; } |