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 <sean@xobs.io>
This commit is contained in:
Sean Cross 2021-02-10 15:21:44 +08:00
parent 6162284d76
commit 4c76bb1a3d

View file

@ -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;
}