diff --git a/sim.c b/sim.c index bc9e6dc..9ca787a 100644 --- a/sim.c +++ b/sim.c @@ -304,7 +304,9 @@ BEGIN_SOLO_PHASE_0(comment) if (!IS_AWAKE) return; Glyph* line = gbuffer + y * width; - Usz max_x = width < x + 255 ? width : x + 255; + Usz max_x = x + 255; + if (width < max_x) + max_x = width; for (Usz x0 = x + 1; x0 < max_x; ++x0) { Glyph g = line[x0]; mbuffer_poke_flags_or(mbuffer, height, width, y, x0, Mark_flag_lock);