[MPlayer-cvslog] r35302 - trunk/input/input.c

reimar subversion at mplayerhq.hu
Tue Oct 30 19:37:37 CET 2012


Author: reimar
Date: Tue Oct 30 19:37:37 2012
New Revision: 35302

Log:
Fix off-by-one error in range check.

Modified:
   trunk/input/input.c

Modified: trunk/input/input.c
==============================================================================
--- trunk/input/input.c	Tue Oct 30 19:23:01 2012	(r35301)
+++ trunk/input/input.c	Tue Oct 30 19:37:37 2012	(r35302)
@@ -1170,7 +1170,7 @@ interpret_key(int code, int paused)
 	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;
       }


More information about the MPlayer-cvslog mailing list