mirror of
https://github.com/cc65/cc65.git
synced 2025-01-12 02:30:44 +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:
parent
9127774a4d
commit
5cd0b86a1a
@ -80,7 +80,9 @@ static unsigned GlobalModeFlags (const ExprDesc* Expr)
|
|||||||
/* Return the addressing mode flags for the given expression */
|
/* Return the addressing mode flags for the given expression */
|
||||||
{
|
{
|
||||||
switch (ED_GetLoc (Expr)) {
|
switch (ED_GetLoc (Expr)) {
|
||||||
|
case E_LOC_ABS: return CF_ABSOLUTE;
|
||||||
case E_LOC_GLOBAL: return CF_EXTERNAL;
|
case E_LOC_GLOBAL: return CF_EXTERNAL;
|
||||||
|
case E_LOC_LITERAL: /* Same as static */
|
||||||
case E_LOC_STATIC: return CF_STATIC;
|
case E_LOC_STATIC: return CF_STATIC;
|
||||||
case E_LOC_REGISTER: return CF_REGVAR;
|
case E_LOC_REGISTER: return CF_REGVAR;
|
||||||
default:
|
default:
|
||||||
@ -1165,7 +1167,7 @@ void Store (ExprDesc* Expr, const Type* StoreType)
|
|||||||
|
|
||||||
/* Prepare the code generator flags */
|
/* Prepare the code generator flags */
|
||||||
Flags = TypeOf (StoreType);
|
Flags = TypeOf (StoreType);
|
||||||
|
|
||||||
/* Do the store depending on the location */
|
/* Do the store depending on the location */
|
||||||
switch (ED_GetLoc (Expr)) {
|
switch (ED_GetLoc (Expr)) {
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user