Commits

Alex Szpakowski committed f67df07

Fixed love.event.clear() (issue #666)

Comments (0)

Files changed (1)

src/modules/event/Event.cpp

 	for (int i = 0; i < 4; i++)
 	{
 		if (!args[i])
-			continue;
+			break;
 		args[i]->retain();
 		nargs++;
 	}
 	Lock lock(mutex);
 	while (!queue.empty())
 	{
-		queue.back()->release();
+		// std::queue::pop will remove the first (front) element.
+		queue.front()->release();
 		queue.pop();
 	}
 }