Skip to content

Commit

Permalink
Merge pull request #433 from dirac-institute/fixes
Browse files Browse the repository at this point in the history
Fix integer overflow
  • Loading branch information
jeremykubica authored Jan 17, 2024
2 parents aeec0b5 + 859390d commit 31fbc57
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/kbmod/search/psi_phi_array_ds.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ struct PsiPhiArrayMeta {
int num_times = 0;
int width = 0;
int height = 0;
int pixels_per_image = 0;
int num_entries = 0;
long unsigned pixels_per_image = 0;
long unsigned num_entries = 0;
int block_size = 0; // Actual memory used per entry.
long unsigned total_array_size = 0;

Expand Down Expand Up @@ -81,8 +81,8 @@ class PsiPhiArray {
inline int get_num_times() { return meta_data.num_times; }
inline int get_width() { return meta_data.width; }
inline int get_height() { return meta_data.height; }
inline int get_pixels_per_image() { return meta_data.pixels_per_image; }
inline int get_num_entries() { return meta_data.num_entries; }
inline long unsigned get_pixels_per_image() { return meta_data.pixels_per_image; }
inline long unsigned get_num_entries() { return meta_data.num_entries; }
inline long unsigned get_total_array_size() { return meta_data.total_array_size; }
inline int get_block_size() { return meta_data.block_size; }

Expand Down

0 comments on commit 31fbc57

Please sign in to comment.