Address size fixes
git-svn-id: svn://svn.cc65.org/cc65/trunk@2659 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
parent
ba68b5f87a
commit
88855545e4
1 changed files with 6 additions and 1 deletions
|
@ -157,8 +157,13 @@ void SymDef (SymEntry* S, ExprNode* Expr, unsigned char AddrSize, unsigned Flags
|
|||
|
||||
/* Map a default address size to a real value */
|
||||
if (AddrSize == ADDR_SIZE_DEFAULT) {
|
||||
long Val;
|
||||
if (IsConstExpr (Expr, &Val) && IsByteRange (Val)) {
|
||||
AddrSize = ADDR_SIZE_ZP;
|
||||
} else {
|
||||
AddrSize = SymAddrSize (S);
|
||||
}
|
||||
}
|
||||
|
||||
/* Set the symbol value */
|
||||
S->V.Expr = Expr;
|
||||
|
|
Loading…
Add table
Reference in a new issue