Sophie

Sophie

distrib > Mandriva > 2006.0 > i586 > by-pkgid > 1cd99b5457589d6e38cc35c96c47f8d0 > files > 6

screen-4.0.2-6.1.20060mdk.src.rpm

diff -Nur screen-4.0.2/encoding.c screen-4.0.3/encoding.c
--- screen-4.0.2/encoding.c	2003-09-08 16:25:23.000000000 +0200
+++ screen-4.0.3/encoding.c	2006-10-23 14:58:14.000000000 +0200
@@ -995,8 +995,16 @@
     {
       /* 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])