Skip to content

Commit

Permalink
stack smashing
Browse files Browse the repository at this point in the history
feature, not a bad compiler
  • Loading branch information
andogq committed Aug 25, 2024
1 parent 1799b7d commit ebf7767
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,19 @@ use lumina::compile_and_run;
fn main() {
let source = r#"
fn main() -> int {
let random = 1024;
let a = [1, 2, 3];
let b = a[1];
let i = 0;
loop {
if a[i] == 1024 {
break;
}
return a[2];
i -= 1;
}
return a[i];
}"#;

let result = compile_and_run(source, true);
Expand Down

0 comments on commit ebf7767

Please sign in to comment.