From 4c76bb1a3d9cdd75dc41755153ff8eff24b6e7d1 Mon Sep 17 00:00:00 2001 From: Sean Cross Date: Wed, 10 Feb 2021 15:21:44 +0800 Subject: [PATCH] emulation: memlcd: fix of-by-one error in redraw This would cause us to escape the screen under rare circumstances. Signed-off-by: Sean Cross --- emulation/peripherals/memlcd.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/emulation/peripherals/memlcd.cs b/emulation/peripherals/memlcd.cs index 13a72556d..23dd44ea2 100644 --- a/emulation/peripherals/memlcd.cs +++ b/emulation/peripherals/memlcd.cs @@ -56,7 +56,7 @@ namespace Antmicro.Renode.Peripherals.Video // 1) The `updateDirty` bit is set and the current line is dirty, or // 2) The `updateAll` bit is set. bool shouldRedrawLine = updateAll; - foreach (int i in Enumerable.Range(42, 22)) { + foreach (int i in Enumerable.Range(41, 22)) { if (shouldRedrawLine) { break; }