File suse-bugzilla-46985-ami-hangs-in-utf8.patch of Package ami

diff -ur ami-1.2.3.orig/src/edit.c ami-1.2.3/src/edit.c
--- ami-1.2.3.orig/src/edit.c	2004-10-13 10:20:29.739911904 +0900
+++ ami-1.2.3/src/edit.c	2004-10-13 10:23:34.674797528 +0900
@@ -355,6 +355,8 @@
     g_return_if_fail (ic != NULL);
     g_return_if_fail (ic->han != NULL);
 
+    if (buf[0] == '\0') return;
+
     pos = ic->han->pos;
     if ( ami_codeset==AMI_UTF8 && IS_UTF8_3BYTE(buf[0]) )
 	len=3;
openSUSE Build Service is sponsored by