On Wed, Jul 11, 2007 at 11:35:06AM +0100, Martín Ferrari wrote:
> Package: moc
> Version: 1:2.5.0~alpha2-1+b1
> Severity: normal
> 
> When using the go to directory (i) or open url (o) commands, and you use
> the delete/backspace to edit the line, the text after the cursor gets
> corrupted.

Attached patch should fix the problem.

-- 
Damian Pietras
Index: interface_elements.c
===================================================================
--- interface_elements.c	(revision 2033)
+++ interface_elements.c	(working copy)
@@ -426,7 +426,7 @@
 		
 		memmove (e->text_ucs + e->cur_pos - 1,
 				e->text_ucs + e->cur_pos,
-				width - e->cur_pos);
+				(width - e->cur_pos) * sizeof(e->text_ucs[0]));
 		e->text_ucs[--width] = L'\0';
 		e->cur_pos--;
 
@@ -453,7 +453,7 @@
 		len--;
 		memmove (e->text_ucs + e->cur_pos,
 				e->text_ucs + e->cur_pos + 1,
-				len - e->cur_pos);
+				(len - e->cur_pos) * sizeof(e->text_ucs[0]));
 		e->text_ucs[len] = L'\0';
 		
 		/* Can we show more after deleting the char? */

Reply via email to