forked from extern/Unexpected-Keyboard
Fix off-by-one error in 1-row layouts
This commit is contained in:
parent
46f3b41393
commit
9d89297c15
@ -82,7 +82,7 @@ public final class KeyboardData
|
|||||||
boolean add_key_to_pos(List<Row> rows, KeyValue kv, KeyPos p)
|
boolean add_key_to_pos(List<Row> rows, KeyValue kv, KeyPos p)
|
||||||
{
|
{
|
||||||
int i_row = p.row;
|
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; }
|
if (p.row == -1) { i_row = 0; i_row_end = rows.size() - 1; }
|
||||||
for (; i_row <= i_row_end; i_row++)
|
for (; i_row <= i_row_end; i_row++)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user