Fixed a invalid cursor position when equipping/using the last item in the inventory list.