Skip to content

Commit

Permalink
typo: Array bounds are exclusive, not inclusive
Browse files Browse the repository at this point in the history
  • Loading branch information
tavianator committed Nov 11, 2022
1 parent 0f76e46 commit 5ce883d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/typo.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#include <string.h>

// Assume QWERTY layout for now
static const int key_coords[UCHAR_MAX][3] = {
static const int key_coords[UCHAR_MAX + 1][3] = {
['`'] = { 0, 0, 0},
['~'] = { 0, 0, 1},
['1'] = { 3, 0, 0},
Expand Down
1 change: 1 addition & 0 deletions tests/bfs/high_byte.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
fail invoke_bfs -$'\xFF'

0 comments on commit 5ce883d

Please sign in to comment.