Skip to content

Commit 5ce883d

Browse files
committed
typo: Array bounds are exclusive, not inclusive
1 parent 0f76e46 commit 5ce883d

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

src/typo.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
#include <string.h>
2121

2222
// Assume QWERTY layout for now
23-
static const int key_coords[UCHAR_MAX][3] = {
23+
static const int key_coords[UCHAR_MAX + 1][3] = {
2424
['`'] = { 0, 0, 0},
2525
['~'] = { 0, 0, 1},
2626
['1'] = { 3, 0, 0},

tests/bfs/high_byte.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
fail invoke_bfs -$'\xFF'

0 commit comments

Comments
 (0)