From be196ad8ec62e9d2927e25c7e017ef2af415a339 Mon Sep 17 00:00:00 2001 From: fennecdjay Date: Fri, 4 Oct 2019 14:44:40 +0200 Subject: [PATCH] :art: Leave room for '\0' --- src/compile.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; } -- 2.43.0