]> git.rm.cloudns.org Git - xonotic/gmqcc.git/commitdiff
properly fill the token string for TOKEN_ATTRIBUTE_*
authorWolfgang Bumiller <blub@speed.at>
Sat, 22 Dec 2012 17:09:17 +0000 (18:09 +0100)
committerWolfgang Bumiller <blub@speed.at>
Sat, 22 Dec 2012 17:09:17 +0000 (18:09 +0100)
lexer.c

diff --git a/lexer.c b/lexer.c
index fac62d4d93894fec600d551e2547f11b7fd7c19a..17fe093be8825206f85fa804013ef618d91b5123 100644 (file)
--- a/lexer.c
+++ b/lexer.c
@@ -1117,6 +1117,7 @@ int lex_do(lex_file *lex)
         case '[':
             nextch = lex_getch(lex);
             if (nextch == '[') {
+                lex_tokench(lex, ch);
                 lex_tokench(lex, nextch);
                 lex_endtoken(lex);
                 return (lex->tok.ttype = TOKEN_ATTRIBUTE_OPEN);
@@ -1136,6 +1137,7 @@ int lex_do(lex_file *lex)
         case ']':
             nextch = lex_getch(lex);
             if (nextch == ']') {
+                lex_tokench(lex, ch);
                 lex_tokench(lex, nextch);
                 lex_endtoken(lex);
                 return (lex->tok.ttype = TOKEN_ATTRIBUTE_CLOSE);