[cctbxbb] match_indices.paired_miller_indices() ungraceful overshoot

Nathaniel Echols nechols at lbl.gov
Sat Apr 6 13:42:56 PDT 2013


On Sat, Apr 6, 2013 at 12:44 AM, James Stroud <xtald00d at gmail.com> wrote:

> I accidentally gave paired_miller_indices() a value > 1 for i_array, and
> got a segfault. The problem looks to be in match_indices.cpp, line 94:
>
>       result.push_back(miller_indices_[i_array][pairs_[i][i_array]]);
>
> Maybe there should be a test that raises an exception on the python side,
> if possible.
>

The way this is usually handled is to add an assertion that i_array <= 1.
 I'm a little surprised this wasn't already in there, but I've committed
the change.

thanks,
Nat
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://phenix-online.org/pipermail/cctbxbb/attachments/20130406/2d72e60b/attachment.htm>


More information about the cctbxbb mailing list