Parcourir la source

- fixed freshly introduced config ID bug

Andrei Pelinescu-Onciul il y a 21 ans
Parent
commit
923c0b3b89
1 fichiers modifiés avec 4 ajouts et 1 suppressions
  1. 4 1
      cfg.lex

+ 4 - 1
cfg.lex

@@ -508,7 +508,10 @@ EAT_ABLE	[\ \t\b\r]
 
 
 <INITIAL>{COM_LINE}.*{CR}	{ count(); } 
 <INITIAL>{COM_LINE}.*{CR}	{ count(); } 
 
 
-<INITIAL>{ID}			{ count(); yylval.strval=yytext; return ID; }
+<INITIAL>{ID}			{ count(); addstr(&s_buf, yytext, yyleng); 
+									yylval.strval=s_buf.s;
+									memset(&s_buf, 0, sizeof(s_buf));
+									return ID; }
 
 
 
 
 <<EOF>>							{
 <<EOF>>							{