(Android) fix potential segfault

This commit is contained in:
ToadKing 2013-02-10 18:59:24 -05:00
parent 18d30fb441
commit b03f1bc950

View File

@ -172,7 +172,7 @@ static void android_input_poll(void *data)
action == AMOTION_EVENT_ACTION_CANCEL || action == AMOTION_EVENT_ACTION_POINTER_UP) ||
(source == AINPUT_SOURCE_MOUSE && action != AMOTION_EVENT_ACTION_DOWN);
if (keyup)
if (keyup && motion_pointer < MAX_TOUCH)
{
memmove(pointer + motion_pointer, pointer + motion_pointer + 1, (MAX_TOUCH - motion_pointer - 1) * sizeof(struct input_pointer));
if (pointer_count > 0)