Fix bugs with LOAD section size

LOAD blocks did not properly update their parent's size until after closed
Additionally, section size wasn't correctly sanitized inside LOAD blocks
This commit is contained in:
ISSOtm
2020-09-03 12:06:13 +02:00
parent e05321356b
commit 9d62b4b9bb
12 changed files with 34 additions and 9 deletions
+5
View File
@@ -0,0 +1,5 @@
SECTION "test", ROM0
LOAD "RAM", WRAM0
ld a, 5
ENDL
db 1
View File
View File
+1
View File
@@ -0,0 +1 @@
>
+5
View File
@@ -0,0 +1,5 @@
SECTION "Overflow", ROM0
ds $6000
LOAD "oops",WRAM0
ds $2001
ENDL
+2
View File
@@ -0,0 +1,2 @@
ERROR: load-overflow.asm(4):
Section 'Overflow' grew too big (max size = 0x8000 bytes, reached 0x8001).
View File
+5
View File
@@ -0,0 +1,5 @@
SECTION "test", ROM0
db 1
LOAD "RAM", WRAM0
ld a, 5
ENDL
View File
View File
+1
View File
@@ -0,0 +1 @@
>