Catrobat/Catroid — pull request #142 by robertpainsi (2013-01-08 14:32:58+00:00)
Title: Issue#54

Only adding script bricks to a new sprite causes an IndexOutOfBounceException.

To be more precise, when adding a new brick, the center of the calculated insertion position has to be rounded up (instead of down).

The main change is
int position = ((1 + lastVisibleBrick - firstVisibleBrick) / 2);
in /catroid/src/org/catrobat/catroid/ui/fragment/ScriptFragment.java on line 294

Successful testrun
http://catrobatgw.ist.tugraz.at:8080/job/Catroid-custom-branch-test/111/