* src/pic/glue.c (emitInitVal): fixed #1659894 (SIGSEGV on arrays)
authortecodev <tecodev@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Sun, 18 Feb 2007 21:28:46 +0000 (21:28 +0000)
committertecodev <tecodev@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Sun, 18 Feb 2007 21:28:46 +0000 (21:28 +0000)
git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@4638 4a8a32a2-be11-0410-ad9d-d568d2c75423

ChangeLog
src/pic/glue.c

index 32bd3e6f37b3b7bc272fa89e81951ab2b1030afb..ad2a84fce7852b0a098eb9455c67e834a465eb51 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2007-02-18 Raphael Neider <rneider AT web.de>
+
+       * src/pic/glue.c (emitInitVal): fixed #1659894 (SIGSEGV on arrays)
+
 2007-02-17 Borut Razem <borut.razem AT siol.net>
 
        * support/cpp2/directives.c, support/cpp2/version.c:
index 316bf02cd8ab8c25a30756db9d2301d2b203690e..a2403e96ac6b6bb7a494502db881c60de7b3cb00 100644 (file)
@@ -1928,7 +1928,7 @@ emitInitVal(struct dbuf_s *oBuf, symbol *topsym, sym_link *my_type, initList *li
        return;
     }
 
-    if (IS_ARRAY(my_type) && topsym->isstrlit) {
+    if (IS_ARRAY(my_type) && topsym && topsym->isstrlit) {
        str = (unsigned char *)SPEC_CVAL(topsym->etype).v_char;
        emitIvalLabel(oBuf, topsym);
        do {