diff options
Diffstat (limited to 'masm/lex.c')
-rw-r--r-- | masm/lex.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -19,7 +19,7 @@ static int lex_next(struct lexer *lexer) int c = getc(lexer->file); if (c == '\n') { - lexer->x = 0; + lexer->x = 1; lexer->y++; } else { lexer->x++; @@ -296,13 +296,13 @@ int lexer_init(const char *path, struct lexer *lexer) { FILE *file = fopen(path, "r"); if (file == NULL) { - ERROR_POS(pos, "cannot file '%s'", path); + ERROR("cannot read '%s'", path); return M_ERROR; } lexer->file = file; lexer->peek = EOF; - lexer->x = 0; - lexer->y = 0; + lexer->x = 1; + lexer->y = 1; return M_SUCCESS; } |