Mercurial > mplayer.hg
diff input/input.c @ 35208:9e06c2e4844e
Fix off-by-one error in range check.
| author | reimar |
|---|---|
| date | Tue, 30 Oct 2012 18:37:37 +0000 |
| parents | f05c75392897 |
| children | 109f7c33a9b6 |
line wrap: on
line diff
--- a/input/input.c Tue Oct 30 18:23:01 2012 +0000 +++ b/input/input.c Tue Oct 30 18:37:37 2012 +0000 @@ -1170,7 +1170,7 @@ break; } if(j == num_key_down) { // key was not in the down keys : add it - if(num_key_down > MP_MAX_KEY_DOWN) { + if(num_key_down >= MP_MAX_KEY_DOWN) { mp_msg(MSGT_INPUT,MSGL_ERR,MSGTR_INPUT_INPUT_Err2ManyKeyDowns); return NULL; }
