summaryrefslogtreecommitdiff
path: root/encoding.c
diff options
context:
space:
mode:
Diffstat (limited to 'encoding.c')
-rw-r--r--encoding.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/encoding.c b/encoding.c
index c7616c4..2426545 100644
--- a/encoding.c
+++ b/encoding.c
@@ -995,8 +995,16 @@ struct mchar *mc;
{
/* full, recycle old entry */
if (c1 >= 0xd800 && c1 < 0xe000)
- comb_tofront(root, c1);
+ comb_tofront(root, c1 - 0xd800);
i = combchars[root]->prev;
+ if (c1 == i + 0xd800)
+ {
+ /* completely full, can't recycle */
+ debug("utf8_handle_comp: completely full!\n");
+ mc->image = '?';
+ mc->font = 0;
+ return;
+ }
/* FIXME: delete old char from all buffers */
}
else if (!combchars[i])