about summary refs log tree commit diff
diff options
context:
space:
mode:
authorBaitinq <[email protected]>2025-05-24 17:37:52 +0200
committerBaitinq <[email protected]>2025-05-24 17:37:52 +0200
commited08a7a2a8a5fdd17e3eaeb8d82174d7211ea5ea (patch)
tree8cd183e2c30afc25f24c1e55d66cc615068a7319
parentCodegen: Get function return type correctly (diff)
downloadinterpreter-ed08a7a2a8a5fdd17e3eaeb8d82174d7211ea5ea.tar.gz
interpreter-ed08a7a2a8a5fdd17e3eaeb8d82174d7211ea5ea.tar.bz2
interpreter-ed08a7a2a8a5fdd17e3eaeb8d82174d7211ea5ea.zip
Examples: Fix example 21
-rw-r--r--examples/21.src4
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/21.src b/examples/21.src
index 5e72c27..fbc4d3a 100644
--- a/examples/21.src
+++ b/examples/21.src
@@ -34,8 +34,8 @@ let sort_array = (n: i64, arr: *i64) => void {
 
 			if x > y {
 				let tmp = *(arr + cast(*i64, i));
-				*(arr + cast(*i64, i)) = *(arr + cast(*i64, j));
-				*(arr + cast(*i64, j)) = tmp;
+				(*(arr + cast(*i64, i))) = *(arr + cast(*i64, j));
+				(*(arr + cast(*i64, j))) = tmp;
 			};
 
 			j = j + 1;