From: Jérémie Astor Date: Thu, 5 Aug 2021 14:54:35 +0000 (+0200) Subject: :art: Improve Shred.arg() X-Git-Tag: nightly~484 X-Git-Url: http://10.10.0.4:5575/?a=commitdiff_plain;h=26a3a525c6b3c13c489a94e3d3323bbd9b147721;p=gwion.git :art: Improve Shred.arg() --- diff --git a/src/lib/shred.c b/src/lib/shred.c index f9ac2e51..cefac600 100644 --- a/src/lib/shred.c +++ b/src/lib/shred.c @@ -106,7 +106,7 @@ static MFUN(shred_arg) { const m_int idx = *(m_int *)MEM(SZ_INT); if (s->info->args.ptr && idx >= 0 && (m_uint)idx < vector_size(&s->info->args)) { const m_str str = (m_str)vector_at(&s->info->args, *(m_uint *)MEM(SZ_INT)); - *(M_Object *)RETURN = str ? new_string(shred->info->mp, shred, str) : NULL; + *(M_Object *)RETURN = new_string(shred->info->mp, shred, str); } else handle(shred, "InvalidShredArgumentRequest"); }