swap calloc arguments

This commit is contained in:
Pavel Rosický 2025-01-10 00:40:58 +01:00
parent 4362c8cf8e
commit c4dbe4da01
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; nstars=sz;
if (stars) free(stars); if (stars) free(stars);
stars = (STAR*)calloc(sizeof(STAR), (long unsigned int)nstars); stars = (STAR*)calloc((long unsigned int)nstars, sizeof(STAR));
if (!stars) { if (!stars) {
fprintf(stderr, "out of mem in STARFIELD::build_stars"); fprintf(stderr, "out of mem in STARFIELD::build_stars");
sz = 0; sz = 0;