From f2c77fa1521d9abd471a5306da52e005e2b16545 Mon Sep 17 00:00:00 2001 From: terminx Date: Mon, 24 Apr 2006 06:00:20 +0000 Subject: [PATCH] Minor improvements to CON_DEFINESOUND & fixes to prevent getlabel() from picking up tabs and other related characters git-svn-id: https://svn.eduke32.com/eduke32@107 1a8010ca-5511-0410-912e-c29ae57300e0 --- polymer/eduke32/source/gamedef.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/polymer/eduke32/source/gamedef.c b/polymer/eduke32/source/gamedef.c index 4cb086812..2ab75f8ea 100644 --- a/polymer/eduke32/source/gamedef.c +++ b/polymer/eduke32/source/gamedef.c @@ -1607,7 +1607,7 @@ void getlabel(void) } i = 0; - while( ispecial(*textptr) == 0 && *textptr!=']' ) + while( ispecial(*textptr) == 0 && *textptr!=']' && *textptr!='\t' && *textptr!='\n' && *textptr!='\r') label[(labelcnt<<6)+i++] = *(textptr++); label[(labelcnt<<6)+i] = 0; @@ -4647,8 +4647,7 @@ repeatcase: } scriptptr--; i = 0; - while( *textptr == ' ') - textptr++; + skipcomments(); while( *textptr != ' ' ) { @@ -4656,10 +4655,9 @@ repeatcase: textptr++,i++; if(i >= BMAX_PATH) { - puts(sounds[k]); initprintf("%s:%ld: error: sound filename exceeds limit of %d characters.\n",compilefile,line_number,BMAX_PATH); error++; - while( *textptr != ' ' ) textptr++; + skipcomments(); break; } }