1
0
mirror of https://github.com/cc65/cc65.git synced 2024-09-29 02:55:20 +00:00

Address size fixes

git-svn-id: svn://svn.cc65.org/cc65/trunk@2659 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
cuz 2003-11-13 00:40:40 +00:00
parent ba68b5f87a
commit 88855545e4

View File

@ -157,7 +157,12 @@ void SymDef (SymEntry* S, ExprNode* Expr, unsigned char AddrSize, unsigned Flags
/* Map a default address size to a real value */ /* Map a default address size to a real value */
if (AddrSize == ADDR_SIZE_DEFAULT) { if (AddrSize == ADDR_SIZE_DEFAULT) {
AddrSize = SymAddrSize (S); long Val;
if (IsConstExpr (Expr, &Val) && IsByteRange (Val)) {
AddrSize = ADDR_SIZE_ZP;
} else {
AddrSize = SymAddrSize (S);
}
} }
/* Set the symbol value */ /* Set the symbol value */