about summary refs log tree commit diff
path: root/examples/19.src
diff options
context:
space:
mode:
Diffstat (limited to 'examples/19.src')
-rw-r--r--examples/19.src2
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/19.src b/examples/19.src
index 5a3543f..2ae1973 100644
--- a/examples/19.src
+++ b/examples/19.src
@@ -3,7 +3,7 @@ extern malloc = (i64) => *void;
 extern free = (*void) => void;
 
 let main = () => i64 {
-	let buf = cast(*i8, malloc(13));
+	let buf = cast(*i8, malloc(sizeof(i8) * 13));
 	(*(buf+cast(*i8, 0))) = 'h';
 	(*(buf+cast(*i8, 1))) = 'e';
 	(*(buf+cast(*i8, 2))) = 'l';