mirror of
https://github.com/cc65/cc65.git
synced 2025-04-08 19:38:55 +00:00
Merge pull request #1996 from bbbradsmith/negative_memory_size_error
ld65 error if computed memory size is negative
This commit is contained in:
commit
d0f17ba602
@ -1936,6 +1936,11 @@ unsigned CfgProcess (void)
|
||||
GetString (M->Name));
|
||||
}
|
||||
M->Size = GetExprVal (M->SizeExpr);
|
||||
if (M->Size >= 0x80000000) {
|
||||
CfgError (GetSourcePos (M->LI),
|
||||
"Size of memory area '%s' is negative: %ld",
|
||||
GetString (M->Name), (long)M->Size);
|
||||
}
|
||||
|
||||
/* Walk through the segments in this memory area */
|
||||
for (J = 0; J < CollCount (&M->SegList); ++J) {
|
||||
|
@ -30,7 +30,7 @@ ISEQUAL = ../../testwrk/isequal$(EXE)
|
||||
CC = gcc
|
||||
CFLAGS = -O2
|
||||
|
||||
START = --start-addr 0x8000
|
||||
START = --start-addr 0x7000
|
||||
|
||||
.PHONY: all clean
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user