Merge pull request #5999 from ahorek/swap_calloc

swap calloc arguments
This commit is contained in:
David Anderson 2025-01-09 16:19:47 -08:00 committed by GitHub
commit ec7205c0bc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -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;