summaryrefslogtreecommitdiff
path: root/src/drv/cdmf.c
diff options
context:
space:
mode:
authorscuri <scuri>2009-06-23 20:55:28 +0000
committerscuri <scuri>2009-06-23 20:55:28 +0000
commitf658209d25477c490bf1892e68a0fd1384c1dded (patch)
tree1d4a2a1088db5ad62acaa3f97f13ccc8906c33b1 /src/drv/cdmf.c
parent0610dd4f3064220a2e8fb1d8dc120044eb6c64a8 (diff)
*** empty log message ***
Diffstat (limited to 'src/drv/cdmf.c')
-rw-r--r--src/drv/cdmf.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/drv/cdmf.c b/src/drv/cdmf.c
index 6c2e711..d44bb5e 100644
--- a/src/drv/cdmf.c
+++ b/src/drv/cdmf.c
@@ -216,14 +216,18 @@ static void cdfchord(cdCtxCanvas *ctxcanvas, double xc, double yc, double w, dou
fprintf(ctxcanvas->file, "%d %g %g %g %g %g %g\n", CDMF_FCHORD, xc, yc, w, h, a1, a2);
}
-static void cdtext(cdCtxCanvas *ctxcanvas, int x, int y, const char *text)
+static void cdtext(cdCtxCanvas *ctxcanvas, int x, int y, const char *text, int len)
{
+ text = cdStrDupN(text, len);
fprintf(ctxcanvas->file, "%d %d %d %s\n", CDMF_TEXT, x, y, text);
+ free((char*)text);
}
-static void cdftext(cdCtxCanvas *ctxcanvas, double x, double y, const char *text)
+static void cdftext(cdCtxCanvas *ctxcanvas, double x, double y, const char *text, int len)
{
+ text = cdStrDupN(text, len);
fprintf(ctxcanvas->file, "%d %g %g %s\n", CDMF_FTEXT, x, y, text);
+ free((char*)text);
}
static void cdpoly(cdCtxCanvas *ctxcanvas, int mode, cdPoint* poly, int n)