Skip to content

Commit

Permalink
Merge pull request #5999 from ahorek/swap_calloc
Browse files Browse the repository at this point in the history
swap calloc arguments
  • Loading branch information
davidpanderson authored Jan 10, 2025
2 parents 4362c8c + c4dbe4d commit ec7205c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion api/gutil.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,7 @@ void STARFIELD::build_stars(int sz, float sp) {
nstars=sz;

if (stars) free(stars);
stars = (STAR*)calloc(sizeof(STAR), (long unsigned int)nstars);
stars = (STAR*)calloc((long unsigned int)nstars, sizeof(STAR));
if (!stars) {
fprintf(stderr, "out of mem in STARFIELD::build_stars");
sz = 0;
Expand Down

0 comments on commit ec7205c

Please sign in to comment.