Fix sporadic spurious (and mysterious) config file parsing failures.
[ircu2.10.12-pk.git] / ircd / ircd_lexer.l
index bb41a592b1c643147885d44a38a89eb07fbf8bf7..590e3bcfa8153c5b71dc0ab150a59252df0393e0 100644 (file)
@@ -26,6 +26,7 @@
 #include <stdlib.h>
 #include "config.h"
 #include "ircd.h"
+#include "ircd_alloc.h"
 #include "ircd_string.h"
 #include "s_debug.h"
 #include "y.tab.h"
@@ -202,7 +203,7 @@ NUMBER [0-9]+
 QSTRING \"[^"\n]+[\"\n]
 %%
 
-{QSTRING} {yytext[yyleng-1] = 0; yylval.text = yytext+1; return QSTRING;}
+{QSTRING} {yytext[yyleng-1] = 0; DupString(yylval.text, yytext+1); return QSTRING;}
 {NUMBER} {yylval.num = strtoul(yytext, NULL, 10); return NUMBER;}
 {WHITE} ;
 {SHCOMMENT} ;