From 26a3a525c6b3c13c489a94e3d3323bbd9b147721 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Astor?= Date: Thu, 5 Aug 2021 16:54:35 +0200 Subject: [PATCH] :art: Improve Shred.arg() --- src/lib/shred.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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"); } -- 2.43.0