Bugfix in Texture2D.getData: Copy rectangle data

Could lead to an array access out of boundaries and it was simply wrong.