mirror of
https://github.com/cc65/cc65.git
synced 2024-11-19 06:31:31 +00:00
error if computed memory size is negative
This commit is contained in:
parent
c097401f8b
commit
5bc8ff98de
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user