Skip to content
Snippets Groups Projects
Commit 67979817 authored by Ruben Asplund's avatar Ruben Asplund
Browse files

B

parent 4efe9bc1
No related branches found
No related tags found
No related merge requests found
......@@ -10,6 +10,7 @@ use panic_klee as _;
fn sum_first_elements(arr: &[u8], index: usize) -> u8 {
let mut acc = 0;
let index = core::cmp::min(arr.len(), index);
for i in 0..index {
acc += arr[i as usize];
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment