From: fennecdjay Date: Fri, 4 Oct 2019 12:44:40 +0000 (+0200) Subject: :art: Leave room for '\0' X-Git-Tag: nightly~2198^2~142 X-Git-Url: http://10.10.0.4:5575/?a=commitdiff_plain;h=be196ad8ec62e9d2927e25c7e017ef2af415a339;p=gwion.git :art: Leave room for '\0' --- diff --git a/src/compile.c b/src/compile.c index 68a3d649..e17d5c1f 100644 --- a/src/compile.c +++ b/src/compile.c @@ -66,7 +66,7 @@ static m_bool _compiler_open(struct Compiler* c) { xfree(name); return c->name ? !!(c->file = fopen(c->name, "r")) : -1; } else if(c->type == COMPILE_MSTR) - return (c->file = fmemopen(c->data, strlen(c->data), "r")) ? 1 : - 1; + return (c->file = fmemopen(c->data, strlen(c->data) + 1, "r")) ? 1 : - 1; return GW_OK; }