We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9477838 commit ed668b6Copy full SHA for ed668b6
src/main.rs
@@ -1035,7 +1035,15 @@ impl Executor {
1035
for item in &mut class.to_owned()[1..class.len()].iter() {
1036
let mut item = item.to_owned();
1037
if item.get_list().len() == 1 {
1038
- let element = &data[index];
+ let element = match data.get(index) {
1039
+ Some(value) => value,
1040
+ None => {
1041
+ self.log_print(format!("Error! initial data is shortage\n"));
1042
+ self.stack
1043
+ .push(Type::Error("instance-shortage".to_string()));
1044
+ return;
1045
+ }
1046
+ };
1047
object.insert(
1048
item.get_list()[0].to_owned().get_string(),
1049
element.to_owned(),
0 commit comments