From 161cae5f9b09aca861a99b69ecc99b897bc517c5 Mon Sep 17 00:00:00 2001 From: cancel Date: Thu, 20 Dec 2018 08:28:58 +0900 Subject: [PATCH] Change 'R' to include the max in the interval --- sim.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sim.c b/sim.c index dc43c67..b426c4a 100644 --- a/sim.c +++ b/sim.c @@ -901,7 +901,7 @@ BEGIN_DUAL_PHASE_1(random) } Usz key = y * width + x; key = hash32_shift_mult((y * width + x) ^ (Tick_number << UINT32_C(16))); - Usz val = key % (max - min) + min; + Usz val = key % (max + 1 - min) + min; POKE(1, 0, glyph_of(val)); END_PHASE