aboutsummaryrefslogtreecommitdiff
path: root/asm
diff options
context:
space:
mode:
Diffstat (limited to 'asm')
-rw-r--r--asm/lexer.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/asm/lexer.c b/asm/lexer.c
index 7d1ad8c..a4905fb 100644
--- a/asm/lexer.c
+++ b/asm/lexer.c
@@ -491,9 +491,10 @@ token_t tokenise_string_literal(buffer_t *buffer, size_t *column)
.column = *column,
.str = malloc(string_size + 1),
.str_size = string_size};
- memcpy(t.str, buffer->data + (buffer->used - string_size), string_size);
+ memcpy(t.str, buffer->data + buffer->used, string_size);
t.str[string_size] = '\0';
*column += string_size + 1;
+ buffer->used += string_size + 1;
return t;
}