Browse Source

Fix incorrect width clamp

master
cancel 6 years ago
parent
commit
ce553109c5
  1. 2
      sim.c

2
sim.c

@ -304,7 +304,7 @@ BEGIN_SOLO_PHASE_0(comment)
if (!IS_AWAKE) if (!IS_AWAKE)
return; return;
Glyph* line = gbuffer + y * width; Glyph* line = gbuffer + y * width;
Usz max_x = width < 255 ? width : 255; Usz max_x = width < x + 255 ? width : x + 255;
for (Usz x0 = x + 1; x0 < max_x; ++x0) { for (Usz x0 = x + 1; x0 < max_x; ++x0) {
Glyph g = line[x0]; Glyph g = line[x0];
mbuffer_poke_flags_or(mbuffer, height, width, y, x0, Mark_flag_lock); mbuffer_poke_flags_or(mbuffer, height, width, y, x0, Mark_flag_lock);

Loading…
Cancel
Save