Browse Source

array index out of bounds returns none now

master
Martin Dørum 7 months 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

@@ -156,7 +156,7 @@ const char *l2_value_type_name(enum l2_value_type typ) {

l2_word l2_value_arr_get(struct l2_vm *vm, struct l2_vm_value *val, l2_word k) {
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) {

Loading…
Cancel
Save