From: Jérémie Astor Date: Mon, 13 Apr 2020 16:48:27 +0000 (+0200) Subject: :bug: Fix string compiling X-Git-Tag: nightly~1699 X-Git-Url: http://10.10.0.4:5575/?a=commitdiff_plain;h=2304f4bf5f15652625609cd07d3f912f5d926a46;p=gwion.git :bug: Fix string compiling --- diff --git a/src/compile.c b/src/compile.c index 5a76f67c..4d67706c 100644 --- a/src/compile.c +++ b/src/compile.c @@ -86,7 +86,7 @@ ANN static m_bool is_reg(const m_str path) { ANN static inline m_bool compiler_open(MemPool p, struct Compiler* c) { char name[strlen(c->name) + 1]; strcpy(name, c->name); - if(!is_reg(name)) { + if(c->type == COMPILE_FILE && !is_reg(name)) { gw_err(_("'%s': is a not a regular file\n"), name); return GW_ERROR; } @@ -110,7 +110,9 @@ ANN static inline m_bool _check(struct Gwion_* gwion, struct Compiler* c) { } ANN static m_uint _compile(struct Gwion_* gwion, struct Compiler* c) { - CHECK_BB(compiler_open(gwion->mp, c)) +// CHECK_BB(compiler_open(gwion->mp, c)) + if(compiler_open(gwion->mp, c) < 0) + return 0; if(_check(gwion, c) < 0) { gw_err(_("while compiling file '%s'\n"), c->base); return 0;