summaryrefslogtreecommitdiff
path: root/src/gdft.c
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2013-04-26 07:45:16 +0200
committerRemi Collet <fedora@famillecollet.com>2013-04-26 07:45:16 +0200
commit20015feb2daaab43b641b21fc88fc59cacb824fc (patch)
tree09c38ef91367f6840e593f0cf878b247bb6c0ccd /src/gdft.c
parentc41c32a4fd090e960dea3a8766dc1e08aba5c4ae (diff)
downloadlibgd-20015feb2daaab43b641b21fc88fc59cacb824fc.tar.gz
fonpath is char **
Diffstat (limited to 'src/gdft.c')
-rw-r--r--src/gdft.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/gdft.c b/src/gdft.c
index 111095e..be906af 100644
--- a/src/gdft.c
+++ b/src/gdft.c
@@ -1481,13 +1481,13 @@ static char * font_pattern(char **fontpath, char *fontpattern)
FcPatternDestroy(font);
return "fontconfig: Couldn't retrieve font file name.";
} else {
- const unsigned int file_len = strlen(file);
+ const unsigned int file_len = strlen((const char *)file);
- fontpath = (char *) gdMalloc(file_len + 1);
- if (fontpath == NULL) {
+ *fontpath = (char *) gdMalloc(file_len + 1);
+ if (*fontpath == NULL) {
return "could not alloc font path";
}
- strncpy(fontpath, file, file_len);
+ strncpy(*fontpath, (const char *)file, file_len);
fontpath[file_len] = 0;
}
FcPatternDestroy(font);