a better fix
authorbernhardheld <bernhardheld@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Wed, 28 Aug 2002 22:09:34 +0000 (22:09 +0000)
committerbernhardheld <bernhardheld@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Wed, 28 Aug 2002 22:09:34 +0000 (22:09 +0000)
git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@2089 4a8a32a2-be11-0410-ad9d-d568d2c75423

src/SDCCglue.c

index 76582d4f987ccdcb734ade1d2f2c4589f72e8f22..4af59fc457092841f08ed1a7ddce797e7592aaf5 100644 (file)
@@ -763,8 +763,8 @@ printIvalArray (symbol * sym, sym_link * type, initList * ilist,
     }
 
   iloop = ilist->init.deep;
-  lcnt = 1;
-  for (last_type = type; last_type; last_type = last_type->next)
+  lcnt = DCL_ELEM (type);
+  for (last_type = type->next; last_type && DCL_ELEM (last_type); last_type = last_type->next)
     lcnt *= DCL_ELEM (last_type);
 
   for (;;)