shithub: neatroff

Download patch

ref: 0d12a19bb62e6bde5b0a215ec0a03b6db420d1d8
parent: e19a3043b55786cc4cede7d9d8ba4641985e1b59
author: Ali Gholami Rudi <[email protected]>
date: Wed May 15 17:21:14 EDT 2013

out: pass unsigned chars to utf8len()

--- a/out.c
+++ b/out.c
@@ -203,7 +203,7 @@
 			if (c[0] == '\t' || c[0] == '' || !strcmp(c_hc, c))
 				continue;
 			g = dev_glyph(c, o_f);
-			if (utf8len(c[0]) == strlen(c))
+			if (utf8len((unsigned char) c[0]) == strlen(c))
 				outnn("c%s%s", c, c[1] ? "\n" : "");
 			else
 				out("C%s\n", c[0] == c_ec && c[1] == '(' ? c + 2 : c);