Skip to content

Commit

Permalink
engine: Layers(...) was actually checking bounds based on X dimension…
Browse files Browse the repository at this point in the history
… instead of Z
  • Loading branch information
godsic authored and barnex committed Nov 13, 2014
1 parent d6e6520 commit f95b761
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion engine/shape.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ func ZRange(a, b float64) Shape {

// Cell layers #a (inclusive) up to #b (exclusive).
func Layers(a, b int) Shape {
Nz := Mesh().Size()[0]
Nz := Mesh().Size()[Z]
if a < 0 || a > Nz || b < 0 || b < a {
util.Fatal("layers ", a, ":", b, " out of bounds (0 - ", Nz, ")")
}
Expand Down

0 comments on commit f95b761

Please sign in to comment.