]> git.gag.com Git - fw/sdcc/commitdiff
fixed bug #613764
authorjohanknol <johanknol@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Mon, 27 Jan 2003 09:36:26 +0000 (09:36 +0000)
committerjohanknol <johanknol@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Mon, 27 Jan 2003 09:36:26 +0000 (09:36 +0000)
git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@2185 4a8a32a2-be11-0410-ad9d-d568d2c75423

src/SDCC.y

index adf00af5e642856e55aa64e2b5e90b53d4e38d96..44ef82b949ea23af59371be1da2b109518ce042d 100644 (file)
@@ -1102,9 +1102,13 @@ type_name
                 /* go to the end of the list */
                 sym_link *p;
                 pointerTypes($2,$1);
-                for ( p = $2 ; p->next ; p=p->next);
-                  p->next = $1 ;
-                  $$ = $2 ;
+                for ( p = $2 ; p && p->next ; p=p->next);
+                if (!p) {
+                  werror(E_SYNTAX_ERROR, yytext);
+                } else {
+                  p->next = $1 ;
+                }
+                $$ = $2 ;
                }   
    ;