random max now defaults to 36
@@ -648,11 +648,13 @@ static Usz hash32_shift_mult(Usz key) {
BEGIN_OPERATOR(random)
LOWERCASE_REQUIRES_BANG;
+ PORT(0, -1, IN);
PORT(0, 1, IN);
- PORT(0, 2, IN);
PORT(1, 0, OUT);
- Usz a = index_of(PEEK(0, 1));
- Usz b = index_of(PEEK(0, 2));
+ Usz a = index_of(PEEK(0, -1));
+ Usz b = index_of(PEEK(0, 1));
+ if (b == 0)
+ b = 36;
Usz min, max;
if (a == b) {
POKE(1, 0, glyph_of(a));
