From 7b567dacc54148b6e099cfa6d6fc782d42f36a40 Mon Sep 17 00:00:00 2001 From: Christian Forfang Date: Wed, 28 May 2014 19:18:22 +0200 Subject: [PATCH] Explicit cast to make C++ compilers happy --- src/fontstash.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/fontstash.h b/src/fontstash.h index dc61bab..0d42fc5 100644 --- a/src/fontstash.h +++ b/src/fontstash.h @@ -683,7 +683,7 @@ struct FONScontext* fonsCreateInternal(struct FONSparams* params) stash->params = *params; // Allocate scratch buffer. - stash->scratch = malloc(FONS_SCRATCH_BUF_SIZE); + stash->scratch = (unsigned char*)malloc(FONS_SCRATCH_BUF_SIZE); if (stash->scratch == NULL) goto error; // Initialize implementation library