From 87857eced33bfa62c787a7be7befdcf496893d93 Mon Sep 17 00:00:00 2001 From: cuz Date: Sat, 6 Dec 2003 14:44:16 +0000 Subject: [PATCH] Fixed a bug git-svn-id: svn://svn.cc65.org/cc65/trunk@2720 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- src/ca65/expr.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/ca65/expr.c b/src/ca65/expr.c index ca6f24916..1d066784f 100644 --- a/src/ca65/expr.c +++ b/src/ca65/expr.c @@ -404,12 +404,16 @@ static ExprNode* FuncSizeOf (void) /* Cheap local symbol */ Sym = SymFindLocal (SymLast, SVal, SYM_FIND_EXISTING); if (Sym == 0) { - Error ("Unknown symbol or scope: `%s%s'", - SB_GetConstBuf (&ScopeName), Name); + Error ("Unknown symbol or scope: `%s'", SVal); } else { SizeSym = GetSizeOfSymbol (Sym); } + /* Remember and skip SVal, terminate ScopeName so it is empty */ + strcpy (Name, SVal); + NextTok (); + SB_Terminate (&ScopeName); + } else { /* Parse the scope and the name */ -- 2.39.5