summaryrefslogtreecommitdiff
path: root/compiler.c
diff options
context:
space:
mode:
authorKyle Gunger <kgunger12@gmail.com>2024-03-26 14:38:10 -0400
committerKyle Gunger <kgunger12@gmail.com>2024-03-26 14:38:10 -0400
commit05ca4b95b8173c7787bfd7407ac67d8079a1f9de (patch)
treec097c100b76e9124eca7e9cc508465f0116552de /compiler.c
parent1dbef61334f0297dd842215da452a79cd3ef1109 (diff)
len fix
Diffstat (limited to 'compiler.c')
-rw-r--r--compiler.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler.c b/compiler.c
index 5ba93ba..2019560 100644
--- a/compiler.c
+++ b/compiler.c
@@ -4967,7 +4967,7 @@ Variable _eval(Scope *s, CompData *data, Vector *tokens, size_t start, size_t en
} else if (tok_str_eq(op_token, "len")){
out = var_init("#literal", typ_get_inbuilt("uint"));
out.location = LOC_LITL;
- out.offset = rhs.type->size;
+ out.offset = _var_size(&rhs);
var_end(&rhs);
return out;
} else {
@@ -6412,7 +6412,7 @@ int main(int argc, char ** argv) {
help();
return 1;
} else if (strcmp(argv[1], "-v") == 0) {
- printf("C based TNSL Compiler (CTC) - version 0.4\n");
+ printf("C based TNSL Compiler (CTC) - version 0.4.1\n");
return 0;
} else if (strcmp(argv[1], "-t") == 0) {
Artifact in = art_from_str(argv[2], '/');