mirror of
https://github.com/UberGames/rpgxEF.git
synced 2025-04-22 08:50:48 +00:00
changed handling of strings
This commit is contained in:
parent
216a871ff8
commit
0ed8422996
1 changed files with 1 additions and 3 deletions
|
@ -19,9 +19,7 @@ KEYWORD [a-zA-Z]+[a-zA-Z0-9]*
|
|||
\"[^\"]*\" {
|
||||
char *s = yytext; s++;
|
||||
yyextra->type = LMT_STRING;
|
||||
yyextra->data.str = malloc(strlen(yytext) - 1);
|
||||
memset(yyextra->data.str, 0, strlen(yytext) - 1);
|
||||
strncpy(yyextra->data.str, s, strlen(yytext) - 2);
|
||||
yyextra->data.str = yytext;
|
||||
yyextra->column += strlen(yytext);
|
||||
return LMT_STRING;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue