Skip to content

Commit

Permalink
[logshim] Appropriate size pad for 1D streams, appropriate error for …
Browse files Browse the repository at this point in the history
…3D streams.
  • Loading branch information
DasVinch committed Dec 5, 2024
1 parent 72824ec commit 3a260ff
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/COREMOD_memory/logshmim.c
Original file line number Diff line number Diff line change
Expand Up @@ -566,9 +566,19 @@ static errno_t compute_function()
IMGID inimg = mkIMGID_from_name(streamname);
resolveIMGID(&inimg, ERRMODE_ABORT);

if(inimg.md->naxis == 3)
{
PRINT_ERROR("streamFITSlog with 3D data is NOT supported");
}

uint32_t xsize = inimg.md->size[0];
uint32_t ysize = inimg.md->size[1];
if(inimg.md->naxis == 1)
{
ysize = 1; // For 1D data, it's likely size[1] is initialized to 0, which will cause trouble.
}
uint32_t zsize = (*cubesize);

uint8_t datatype = inimg.md->datatype;


Expand Down

0 comments on commit 3a260ff

Please sign in to comment.