Browse Source

array index out of bounds returns none now

master
Martin Dørum 3 years ago
parent
commit
a60ae14896
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      lib/vm/vm.c

+ 1
- 1
lib/vm/vm.c View File



l2_word l2_value_arr_get(struct l2_vm *vm, struct l2_vm_value *val, l2_word k) { l2_word l2_value_arr_get(struct l2_vm *vm, struct l2_vm_value *val, l2_word k) {
if (k >= val->extra.arr_length) { if (k >= val->extra.arr_length) {
return l2_vm_error(vm, "Array index out of bounds");
return vm->knone;
} }


if (val->flags & L2_VAL_SBO) { if (val->flags & L2_VAL_SBO) {

Loading…
Cancel
Save