summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Phillips <david@sighup.nz>2018-08-01 01:48:30 +1200
committerDavid Phillips <david@sighup.nz>2018-08-01 01:48:30 +1200
commita2e204aea97e7f844a5303f956c893579a89623e (patch)
tree41d4bfbba883d6e49ab8fbd3197381dfd10e63d4
parent645acc193a739ab771fb46e8ec2cf6cd87909597 (diff)
downloadhence-a2e204aea97e7f844a5303f956c893579a89623e.tar.xz
Fix buffer indexing error affecting alphanum tok value
-rw-r--r--lexer.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lexer.c b/lexer.c
index 251afed..40dfd67 100644
--- a/lexer.c
+++ b/lexer.c
@@ -132,7 +132,7 @@ lex_alphanum(void) {
i = 0;
while (i < MAX_IDENT_LENGTH - 1 && isalnum(buf[column_number + i])) {
- t.value[i] = buf[i];
+ t.value[i] = buf[column_number + i];
i++;
}
t.value[i] = '\0';