From 3f636465f65f1aa40a02242588289cde4dd170d6 Mon Sep 17 00:00:00 2001 From: Sergio Chouhy Date: Tue, 25 Nov 2025 14:51:28 -0300 Subject: [PATCH] avoid using manual indexing in vector --- .../program_methods/guest/src/bin/privacy_preserving_circuit.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nssa/program_methods/guest/src/bin/privacy_preserving_circuit.rs b/nssa/program_methods/guest/src/bin/privacy_preserving_circuit.rs index 97a49a0..7bca005 100644 --- a/nssa/program_methods/guest/src/bin/privacy_preserving_circuit.rs +++ b/nssa/program_methods/guest/src/bin/privacy_preserving_circuit.rs @@ -29,7 +29,7 @@ fn main() { panic!("Max depth is exceeded"); } - if program_outputs[num_calls - 1].chained_call.is_some() { + if program_outputs.last().and_then(|last| last.chained_call.as_ref()).is_some() { panic!("Call stack is incomplete"); }