From 35f92e8706db78c6aa7482b5e1cdb59c5972a965 Mon Sep 17 00:00:00 2001 From: kobalicek Date: Mon, 27 Jun 2022 12:10:40 +0200 Subject: [PATCH] [Bug] The compiler should not bail when there is data before the FuncEnd node --- src/asmjit/core/rabuilders_p.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/asmjit/core/rabuilders_p.h b/src/asmjit/core/rabuilders_p.h index 1b76303..9d9b428 100644 --- a/src/asmjit/core/rabuilders_p.h +++ b/src/asmjit/core/rabuilders_p.h @@ -401,7 +401,7 @@ public: if (node->type() == NodeType::kSentinel) { if (node == _funcNode->endNode()) { // Make sure we didn't flow here if this is the end of the function sentinel. - if (ASMJIT_UNLIKELY(_curBlock)) + if (ASMJIT_UNLIKELY(_curBlock && _hasCode)) return DebugUtils::errored(kErrorInvalidState); break; }