sovereign-intelligence
Front door to Drake Stapleton's sovereign stack.
Brought by drakestapleton
sovereign-intelligence / harness / examples / mistake_short_circuit.om
| 1 | note mistake_short_circuit: and/or evaluate both sides, so this still loads a[4] and traps 3 (exit 103) |
| 2 | note fix: test the bound in an outer if, then load inside it |
| 3 | fn main to int |
| 4 | a = new uchar 4 0 |
| 5 | i = ulong 4 |
| 6 | if and lt i len a eq get a i 0 |
| 7 | ret 1 |
| 8 | end |
| 9 | ret 0 |
| 10 | end |