Fix off-by-one error in 1-row layouts

This commit is contained in:
Jules Aguillon 2024-05-27 23:59:09 +02:00
parent 46f3b41393
commit 9d89297c15

View File

@ -82,7 +82,7 @@ public final class KeyboardData
boolean add_key_to_pos(List<Row> rows, KeyValue kv, KeyPos p)
{
int i_row = p.row;
int i_row_end = Math.min(p.row, rows.size());
int i_row_end = Math.min(p.row, rows.size() - 1);
if (p.row == -1) { i_row = 0; i_row_end = rows.size() - 1; }
for (; i_row <= i_row_end; i_row++)
{