1
0
mirror of https://github.com/cc65/cc65.git synced 2024-12-27 15:29:46 +00:00

One less bug in sizeof ("ABC").

git-svn-id: svn://svn.cc65.org/cc65/trunk@1274 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
cuz 2002-05-16 17:05:36 +00:00
parent 5c2e2e5a96
commit 3292569a89

View File

@ -988,7 +988,7 @@ static int primary (ExprDesc* lval)
if (CurTok.Tok == TOK_SCONST) {
lval->Flags = E_MCONST | E_TLIT;
lval->ConstVal = CurTok.IVal;
lval->Type = GetCharArrayType (strlen (GetLiteral (CurTok.IVal)));
lval->Type = GetCharArrayType (GetLiteralPoolOffs () - CurTok.IVal);
NextToken ();
return 0;
}