Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion mdstcpip/mdsipshr/GetAnswerInfo.c
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ int GetAnswerInfoTO(int id, char *dtype, short *length, char *ndims, int *dims,
dims[i] =
i % 2 ? m->h.dims[i / 2] & 0xffffffff : (*m)->h.dims[i / 2] >> 32;
#else
if (m->h.dims[i])
if (m->h.dims[i] || !datalen)
dims[i] = m->h.dims[i];
else
{
Expand Down
11 changes: 10 additions & 1 deletion tdishr/TdiGetNci.c
Original file line number Diff line number Diff line change
Expand Up @@ -656,7 +656,16 @@ int Tdi1GetNci(opcode_t opcode __attribute__((unused)), int narg,
out_ptr->pointer->dtype = DTYPE_NID;
if (STATUS_OK && out_ptr->pointer && out_ptr->pointer->class == CLASS_A &&
((struct descriptor_a *)(out_ptr->pointer))->arsize == 0)
status = TreeNNF;
{
if (key_ptr->item_code != RECORDIDX) {
status = TreeNNF; // Keep previous behaviour when not asking for RECORD
}
else if (out_ptr->pointer->length == 0)
{
status = TreeNODATA; // If RECORD is truly empty, return TreeNODATA error
}
// If RECORD is not empty but has zero size, no action is needed
}

return status;
}