From 485773ca82afadc210a916c414a1e5a02232a527 Mon Sep 17 00:00:00 2001 From: Rerumu Date: Fri, 5 Nov 2021 17:15:56 -0400 Subject: [PATCH] Fix assert ordering --- Compiler/src/Compiler.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Compiler/src/Compiler.cpp b/Compiler/src/Compiler.cpp index 4c86b6f9..781cf2bd 100644 --- a/Compiler/src/Compiler.cpp +++ b/Compiler/src/Compiler.cpp @@ -2478,12 +2478,13 @@ struct Compiler } else if (AstStatContinue* stat = node->as()) { + LUAU_ASSERT(!loops.empty()); + if (loops.back().untilCondition) validateContinueUntil(stat, loops.back().untilCondition); // before continuing, we need to close all local variables that were captured in closures since loop start // normally they are closed by the enclosing blocks, including the loop block, but we're skipping that here - LUAU_ASSERT(!loops.empty()); closeLocals(loops.back().localOffset); size_t label = bytecode.emitLabel();