The original function does not validate its target, it just uses undefined memory instead when this case happens.
Player::items[]