shithub: neatroff

Download patch

ref: 928b07b62c2ba00e09855a83cf61bce20fc5d3f7
parent: 23c9c796ad136f6bac96e21f3add6fda8332ebb9
author: Ali Gholami Rudi <ali@rudi.ir>
date: Sun Apr 21 12:50:31 EDT 2013

out: fix calculating utf-8 character length

--- a/out.c
+++ b/out.c
@@ -53,7 +53,7 @@
 
 static char *utf8get(char *d, char *s)
 {
-	int l = utf8len(*s);
+	int l = utf8len((unsigned char) *s);
 	int i;
 	for (i = 0; i < l; i++)
 		d[i] = s[i];