fix surrogate crash.

This commit is contained in:
Christopher Jeffrey 2015-04-15 10:38:26 -07:00
parent 29ca94e719
commit c5e5ed86f6
1 changed files with 1 additions and 1 deletions

View File

@ -3997,7 +3997,7 @@ Element.prototype.render = function() {
// Handle surrogate pairs:
// Make sure we put surrogate pair chars in one cell.
if (this.screen.fullUnicode) {
if (this.screen.fullUnicode && content[ci - 1]) {
var code = content[ci - 1].charCodeAt(0);
// if (content.codePointAt(ci - 1) > 0xffff) {
if (code >= 0xd800 && code <= 0xdbff) {