* src/SDCCast.c (createIvalCharPtr): fixed bug 1348271
authorbernhardheld <bernhardheld@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Wed, 23 Nov 2005 07:58:52 +0000 (07:58 +0000)
committerbernhardheld <bernhardheld@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Wed, 23 Nov 2005 07:58:52 +0000 (07:58 +0000)
git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@3971 4a8a32a2-be11-0410-ad9d-d568d2c75423

ChangeLog
src/SDCCast.c

index 6f2846e266a42354998ca12d82b0d88b5e915c24..ebe15fcb6c45a69787375738173e10dd7d891781 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2005-11-23 Bernhard Held <bernhard AT bernhardheld.de>
+
+       * src/SDCCast.c (createIvalCharPtr): fixed bug 1348271
+
 2005-11-22 Maarten Brock <sourceforge.brock AT dse.nl>
 
        * device/lib/_fs2schar.c,
index 108f6d73e7d4fc89eea38853d720f6c9dfad2cfd..d82a071942e6a1615652bc0b8433f36489bc0703 100644 (file)
@@ -1030,8 +1030,12 @@ createIvalCharPtr (ast * sym, sym_link * type, ast * iexpr)
       if (size>symsize)
         {
           if (size>(symsize+1))
-            werrorfl (iexpr->filename, iexpr->lineno, W_EXCESS_INITIALIZERS,
-                      "string", sym->opval.val->sym->name);
+            {
+              char *name = (IS_AST_SYM_VALUE(sym)) ? AST_SYMBOL(sym)->name : "";
+
+              werrorfl (iexpr->filename, iexpr->lineno, W_EXCESS_INITIALIZERS,
+                        "string", name);
+            }
           size = symsize;
         }