From 0165a9b1216b56e417e647892aaeda5741f3ce5a Mon Sep 17 00:00:00 2001 From: Saveliy Skresanov Date: Fri, 6 Oct 2023 23:10:47 +0700 Subject: [PATCH] Fix a bug in the font editor where the last row of a symbol is cleared when shifting the whole symbol up. --- src/gui/font/FontEditor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/font/FontEditor.cpp b/src/gui/font/FontEditor.cpp index b7ce036e1..1641b4242 100644 --- a/src/gui/font/FontEditor.cpp +++ b/src/gui/font/FontEditor.cpp @@ -529,7 +529,7 @@ void FontEditor::Translate(std::array, FONT_H> &pixe std::array, FONT_H> old = pixels; for(int j = 0; j < FONT_H; j++) for(int i = 0; i < MAX_WIDTH; i++) - if(i - dx >= 0 && i - dx + 1 < MAX_WIDTH && j - dy >= 0 && j - dy + 1 < FONT_H) + if(i - dx >= 0 && i - dx < MAX_WIDTH && j - dy >= 0 && j - dy < FONT_H) pixels[j][i] = old[j - dy][i - dx]; else pixels[j][i] = 0;