about summary refs log tree commit diff
path: root/examples/18.src
diff options
context:
space:
mode:
Diffstat (limited to 'examples/18.src')
-rw-r--r--examples/18.src10
1 files changed, 5 insertions, 5 deletions
diff --git a/examples/18.src b/examples/18.src
index 90234c4..6d75e30 100644
--- a/examples/18.src
+++ b/examples/18.src
@@ -4,13 +4,13 @@ extern free = (*i64) => void;
 
 let main = () => i64 {
 	let x = malloc(128);
-	/*
-	*(x+0) = 10;
-	*(x+8) = 20;
-	*/
+	(*(x+0)) = 10;
+	(*(x+1)) = 20;
+	(*(x+2)) = 40;
 	printf("%p\n", x);
-	printf("%d\n", *x);
+	printf("%d\n", *(x+0));
 	printf("%d\n", *(x+1));
+	printf("%d\n", *(x+2));
 	free(x);
 	return 0;
 };