summaryrefslogtreecommitdiff
path: root/lexer.c
diff options
context:
space:
mode:
Diffstat (limited to 'lexer.c')
-rw-r--r--lexer.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/lexer.c b/lexer.c
index 47109ca..df478b0 100644
--- a/lexer.c
+++ b/lexer.c
@@ -301,7 +301,9 @@ uint64_t lex(char *str, uint64_t address, uint8_t dbg) {
break;
case PTOK_DQUOTE:
i++;
- for (; isdelm(str[i+j], dbg) != 4; j++);
+ for (; isdelm(str[i+j], dbg) != 4 || isesc; j++) {
+ isesc = (str[i+j] == '\\' && str[i+(j-1)] != '\\');
+ }
memcpy(lexeme, str+i, j);
lexeme[j] = '\0';
i += j;
@@ -317,7 +319,7 @@ uint64_t lex(char *str, uint64_t address, uint8_t dbg) {
printf("lex(): str[0x%04X]: %s\n", strid, string[strid]);
}
if (lt->id == TOK_DIR && lt->type == DIR_INCLUDE) {
- incl[inc_count] = strid;
+ incl[inc_count+inc_file] = strid;
inc_file++;
}
lex_type = TOK_STRING;