aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorpacien2018-06-05 23:15:33 +0200
committerpacien2018-06-05 23:15:33 +0200
commit68702158711deb4b4c9e84ebaf73da943cb7157e (patch)
treee0c4bf4822a543d724aa10dd90d1dd675081cb59 /src
parent12c6e05e4c341e3db89e4551299b3f10e7623542 (diff)
downloadtpc-compiler-68702158711deb4b4c9e84ebaf73da943cb7157e.tar.gz
fix const retrieval
Diffstat (limited to 'src')
-rw-r--r--src/generator.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/generator.c b/src/generator.c
index ab3777c..f35b695 100644
--- a/src/generator.c
+++ b/src/generator.c
@@ -407,7 +407,7 @@ int gen_value(const char ident[], Scope scope) {
407 407
408 case GLOBAL: 408 case GLOBAL:
409 if (is_read_only(ident, scope)) 409 if (is_read_only(ident, scope))
410 fprintf(output, "push QWORD %s\n", ident); 410 fprintf(output, "push QWORD [%s]\n", ident);
411 else 411 else
412 fprintf(output, "push QWORD [globals + %d] ;%s\n", glo_get_addr(ident), ident); 412 fprintf(output, "push QWORD [globals + %d] ;%s\n", glo_get_addr(ident), ident);
413 413