diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2021-07-26 01:12:04 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2021-07-26 01:12:04 -0700 |
commit | ef637b6baba763ea3b76a06ec34babb9ee08d2cd (patch) | |
tree | c79100c7d91ac40ab4eb258c0a2ccce632d2c8b8 | |
parent | 3e76e0540b56325f7e195b03b24ace60c8a871ea (diff) | |
download | mu-ef637b6baba763ea3b76a06ec34babb9ee08d2cd.tar.gz |
.
-rw-r--r-- | shell/primitives.mu | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/shell/primitives.mu b/shell/primitives.mu index 92a2c7a7..daf62fe4 100644 --- a/shell/primitives.mu +++ b/shell/primitives.mu @@ -3622,7 +3622,7 @@ fn apply-index _args-ah: (addr handle cell), out: (addr handle cell), trace: (ad return } var second-ah/edx: (addr handle cell) <- get right, left - # compare + # index var _first/eax: (addr cell) <- lookup *first-ah var first/ecx: (addr cell) <- copy _first { @@ -3644,9 +3644,9 @@ fn apply-index _args-ah: (addr handle cell), out: (addr handle cell), trace: (ad var index/edx: int <- convert *second-value var data-ah/eax: (addr handle array handle cell) <- get first, array-data var data/eax: (addr array handle cell) <- lookup *data-ah - var len/ebx: int <- length data - compare index, len { + var len/eax: int <- length data + compare index, len break-if-< error trace, "too few elements in array" return |