From 757ef279185c3b75aed321cd5ac35aafbcdb642f Mon Sep 17 00:00:00 2001 From: fennecdjay Date: Fri, 22 Jul 2022 14:54:54 +0200 Subject: [PATCH] :art: more Machine stuff --- src/lib/shred.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/lib/shred.c b/src/lib/shred.c index e7d51842..d38fc909 100644 --- a/src/lib/shred.c +++ b/src/lib/shred.c @@ -70,7 +70,9 @@ static MFUN(vm_shred_is_running) { *(m_uint *)RETURN = ((m_int)s->tick->prev != -1 && (s->tick->prev || s->tick->next)) ? true : false; } -static MFUN(vm_shred_is_done) { *(m_uint *)RETURN = !ME(o) ? true : false; } +static MFUN(vm_shred_is_done) { + *(m_uint *)RETURN = (m_int)s->tick->prev == -1; +} static MFUN(shred_yield) { const VM_Shred s = ME(o); -- 2.43.0