From ed49e361b6dd2230a1ad1dd4cfa4aebd42964ea0 Mon Sep 17 00:00:00 2001 From: Jiri Malak Date: Sun, 2 Jun 2024 21:09:03 +0200 Subject: [PATCH] cc: fix for issue #1274 (thanks @fafner2000) incorrectly handled additional comma after the items list --- bld/cc/c/cdinit.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/bld/cc/c/cdinit.c b/bld/cc/c/cdinit.c index aa7757cd58..4c0b920375 100644 --- a/bld/cc/c/cdinit.c +++ b/bld/cc/c/cdinit.c @@ -1396,11 +1396,12 @@ static void InitStructUnionVar( SYMPTR sym, SYM_HANDLE sym_handle, int index, TY MustRecog( T_RIGHT_BRACE ); if( CurToken == T_EOF ) break; - if( field->next_field == NULL ) - break; if( CurToken != T_RIGHT_BRACE ) { MustRecog( T_COMMA ); } + if( field->next_field == NULL ) { + break; + } } }