[GRASS5] Re: Freetype failure

Glynn Clements glynn at gclements.plus.com
Thu Mar 30 14:11:17 EST 2006


Roger Miller wrote:

> On composing a reply I found myself repeating things I've said before.
> I think that by definition that means this discussion is going nowhere.
> All I can really ask is that someone fix the features that caused my
> original problems.

I've applied fixes locally for the size_t and memset() issues, but
haven't had chance to test them.

I've attached the patch (against current CVS) if anyone else wants to
check them.

I haven't changed from UCS-2 to UCS-4; there doesn't seem much point
unless there actually exists a TrueType font which uses codepoints
outside the BMP.

-- 
Glynn Clements <glynn at gclements.plus.com>

-------------- next part --------------
Index: display/drivers/lib/text3.c
===================================================================
RCS file: /grassrepository/grass6/display/drivers/lib/text3.c,v
retrieving revision 2.4
diff -u -r2.4 text3.c
--- display/drivers/lib/text3.c	14 Feb 2006 02:19:04 -0000	2.4
+++ display/drivers/lib/text3.c	30 Mar 2006 19:07:19 -0000
@@ -136,8 +136,8 @@
 {
 	iconv_t cd;
 	size_t ret;
-	int len = 0;
-	int i = 0;
+	size_t len = 0;
+	size_t i = 0;
 	int res = 0;
 	const unsigned char *p1;
 	unsigned char *p2;
@@ -147,7 +147,7 @@
 /* 	res = 4*(len+1); */
 
 	*out = G_malloc(res);
-	memset(*out,res,0);
+	memset(*out,0,res);
 	p1 = in;
 	p2 = *out;
 


More information about the grass-dev mailing list