From ac7e0a144bf7380b22f295f3ffc80b5861e0ca28 Mon Sep 17 00:00:00 2001 From: Cas Cremers Date: Mon, 15 Oct 2018 17:31:53 -0400 Subject: [PATCH] Fixed another nested functions. --- src/system.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/src/system.c b/src/system.c index 0f22aa0..7ea47ee 100644 --- a/src/system.c +++ b/src/system.c @@ -1081,16 +1081,19 @@ iterateAllEvents (const System sys, { int run; - int callwrapper (Roledef rd, int ev) - { - return callback (run, rd, ev); - } - for (run = 0; run < sys->maxruns; run++) { - if (!iterateEvents (sys, run, callwrapper)) + int e; + Roledef rd; + + rd = sys->runs[run].start; + for (e = 0; e < sys->runs[run].step; e++) { - return false; + if (!callback (run, rd, e)) + { + return false; + } + rd = rd->next; } } return true;