summaryrefslogtreecommitdiff
path: root/masm/lex.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--masm/lex.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/masm/lex.c b/masm/lex.c
index 06c7114..788523b 100644
--- a/masm/lex.c
+++ b/masm/lex.c
@@ -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;
}