From 3292569a89f8190248adf7d388326fb26ca67dba Mon Sep 17 00:00:00 2001 From: cuz Date: Thu, 16 May 2002 17:05:36 +0000 Subject: [PATCH] One less bug in sizeof ("ABC"). git-svn-id: svn://svn.cc65.org/cc65/trunk@1274 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- src/cc65/expr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; } -- 2.39.5