medo91 / beginning-android-games

Automatically exported from code.google.com/p/beginning-android-games
0 stars 0 forks source link

[Chapter 8] (bug): Out of bounds exception in SpatialHashGrid #16

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
The SpatialHashGrid class throws a out of bounds exception in several places:

36: while((cellId = cellIds[i++]) != -1) {
45: while((cellId = cellIds[i++]) != -1) {
54: while((cellId = cellIds[i++]) != -1) {
72: while((cellId = cellIds[i++]) != -1) {

Fixed version of the class is in attached file

Original issue reported on code.google.com by Rieder.A...@gmail.com on 26 Jun 2011 at 1:34

Attachments:

GoogleCodeExporter commented 8 years ago
Oh, thanks a bunch!

Original comment by badlogicgames on 24 Aug 2011 at 4:08

GoogleCodeExporter commented 8 years ago
Fixed in second revision!

Original comment by badlogicgames on 6 Sep 2011 at 1:59