File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ The powerful script language designed with a stack oriented approach for efficie
3
3
4
4
![ image] ( https://github.com/Stack-Programing-Community/Stack-Programing-Language/assets/122075081/5d7ff479-731b-4def-808a-12dc5301a7a1 )
5
5
6
- ## Installation
6
+ ## Install
7
7
8
8
### If you don't want to install...
9
9
Original file line number Diff line number Diff line change @@ -1035,7 +1035,15 @@ impl Executor {
1035
1035
for item in & mut class. to_owned ( ) [ 1 ..class. len ( ) ] . iter ( ) {
1036
1036
let mut item = item. to_owned ( ) ;
1037
1037
if item. get_list ( ) . len ( ) == 1 {
1038
- let element = & data[ index] ;
1038
+ 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
+ } ;
1039
1047
object. insert (
1040
1048
item. get_list ( ) [ 0 ] . to_owned ( ) . get_string ( ) ,
1041
1049
element. to_owned ( ) ,
You can’t perform that action at this time.
0 commit comments