From 5a0fcda4c83b2ee3918655a5f5c393613fea50fe Mon Sep 17 00:00:00 2001 From: ISSOtm Date: Fri, 20 Mar 2020 18:57:37 +0100 Subject: [PATCH] Prevent `POPS` within `LOAD` blocks --- src/asm/section.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/asm/section.c b/src/asm/section.c index ce3b66b0..4f0a1257 100644 --- a/src/asm/section.c +++ b/src/asm/section.c @@ -562,6 +562,9 @@ void out_PopSection(void) if (pSectionStack == NULL) fatalerror("No entries in the section stack"); + if (currentLoadSection) + fatalerror("Cannot change the section within a `LOAD` block!"); + struct SectionStackEntry *pSect; pSect = pSectionStack;