From: cuz Date: Thu, 16 May 2002 17:05:36 +0000 (+0000) Subject: One less bug in sizeof ("ABC"). X-Git-Tag: V2.12.0~2348 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=3292569a89f8190248adf7d388326fb26ca67dba;p=cc65 One less bug in sizeof ("ABC"). git-svn-id: svn://svn.cc65.org/cc65/trunk@1274 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- diff --git a/src/cc65/expr.c b/src/cc65/expr.c index c78d98cee..f39b2ce11 100644 --- a/src/cc65/expr.c +++ b/src/cc65/expr.c @@ -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; }