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>
This commit is contained in:
Russ Cox 2016-01-22 06:50:38 -05:00
parent 009b0cb5eb
commit c499ab911d

View file

@ -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;
}