interplane.Get Omega
Read in your language

sovereign-intelligence

Front door to Drake Stapleton's sovereign stack.

Brought by drakestapleton

branch main Branches Tags History

sovereign-intelligence / tests / omc / examples / count_trap3.om

11 lines · 351 bytes Raw Blame History
1note count_trap3: count checks its slice as read and write do, n <= len A and off <= len A - n, before it
2note reads a byte; here off 5 and n 4 end one past an 8-byte array, so it traps 3, exit 103, whatever v is
3om2
4text before "before\n"
5fn main to int
6k = write 1 before 0 len before
7a = new uchar 8 10
8o = ulong 5
9n = count a o 4 10
10ret int n
11end