shithub: orca

Download patch

ref: ce553109c56968c11cca37710bd537d242957f9e
parent: 42e615816b9f71934969162b88fb91e1d39fb038
author: cancel <cancel@cancel.fm>
date: Fri Nov 30 06:19:51 EST 2018

Fix incorrect width clamp

--- a/sim.c
+++ b/sim.c
@@ -304,7 +304,7 @@
   if (!IS_AWAKE)
     return;
   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) {
     Glyph g = line[x0];
     mbuffer_poke_flags_or(mbuffer, height, width, y, x0, Mark_flag_lock);