Skip to content

Commit

Permalink
MIR-650 Exception terminates mir-get-data: HEALPix nested ordering wi…
Browse files Browse the repository at this point in the history
…th N=1
  • Loading branch information
pmaciel committed Mar 11, 2024
1 parent c7f5c24 commit 04178bd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/mir/reorder/HEALPix.cc
Original file line number Diff line number Diff line change
Expand Up @@ -185,8 +185,8 @@ int HEALPixReorder::ring_to_nest(int r) const {
p -= 8 * Nside_;
}

int i = (r + p) >> 1;
int j = (r - p) >> 1;
int i = std::max(0, (r + p)) >> 1;
int j = std::max(0, (r - p)) >> 1;

ASSERT(f < 12 && i < Nside_ && j < Nside_);
return CodecFijNest::fij_to_nest(f, i, j, k_);
Expand Down

0 comments on commit 04178bd

Please sign in to comment.