From: johanknol Date: Mon, 27 Jan 2003 09:36:26 +0000 (+0000) Subject: fixed bug #613764 X-Git-Url: https://git.gag.com/?a=commitdiff_plain;h=3894b38af99b952766048d8e78080a67a8bc7b0c;p=fw%2Fsdcc fixed bug #613764 git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@2185 4a8a32a2-be11-0410-ad9d-d568d2c75423 --- diff --git a/src/SDCC.y b/src/SDCC.y index adf00af5..44ef82b9 100644 --- a/src/SDCC.y +++ b/src/SDCC.y @@ -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 ; } ;