HEXRD / hexrd

A cross-platform, open-source library for the analysis of X-ray diffraction data.
Other
55 stars 26 forks source link

Fix integer overflow issue in fabio #623

Closed psavery closed 4 months ago

psavery commented 5 months ago

fabio would perform some arithmetic with the frame number we provided it to compute byte offsets for GE images. On Windows, an int times a np.int32 is an np.int32. If our frame number was np.int32, for large datasets, this would cause an overflow error, since int32 would be used for the byte offset.

Instead, ensure a python integer is passed, which cannot overflow.