Skip to content

Commit

Permalink
Fix array index out of bound error in stress.c
Browse files Browse the repository at this point in the history
  • Loading branch information
kcwu committed Sep 30, 2016
1 parent 9a247b0 commit e1581be
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/stress.c
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ int main(int argc, char *argv[])
if (!handled)
break;
} else {
if (0 <= v && v < max_key) {
if (0 <= v && v < sizeof(all_key) / sizeof(all_key[0])) {
int key = all_key[v];
type_single_keystroke(ctx, key);
} else {
Expand Down

0 comments on commit e1581be

Please sign in to comment.