1
0
mirror of https://github.com/cc65/cc65.git synced 2024-06-17 00:29:31 +00:00

Indexing a string by an expression which was not a simple variable didn't

work:  "abcd"[atoi("2")];
                         


git-svn-id: svn://svn.cc65.org/cc65/trunk@3880 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
uz 2008-08-05 21:20:42 +00:00
parent 9127774a4d
commit 5cd0b86a1a

View File

@ -80,7 +80,9 @@ static unsigned GlobalModeFlags (const ExprDesc* Expr)
/* Return the addressing mode flags for the given expression */
{
switch (ED_GetLoc (Expr)) {
case E_LOC_ABS: return CF_ABSOLUTE;
case E_LOC_GLOBAL: return CF_EXTERNAL;
case E_LOC_LITERAL: /* Same as static */
case E_LOC_STATIC: return CF_STATIC;
case E_LOC_REGISTER: return CF_REGVAR;
default:
@ -1165,7 +1167,7 @@ void Store (ExprDesc* Expr, const Type* StoreType)
/* Prepare the code generator flags */
Flags = TypeOf (StoreType);
/* Do the store depending on the location */
switch (ED_GetLoc (Expr)) {