fix dbGet to fail when reading scalars from empty arrays

This commit is contained in:
2020-06-09 16:14:49 +02:00
parent a42197f0d6
commit 3176651c71

View File

@@ -945,6 +945,11 @@ long dbGet(DBADDR *paddr, short dbrType,
if (offset == 0 && (!nRequest || no_elements == 1)) {
if (nRequest)
*nRequest = 1;
else if (no_elements < 1) {
status = S_db_onlyOne;
goto done;
}
if (!pfl || pfl->type == dbfl_type_rec) {
status = dbFastGetConvertRoutine[field_type][dbrType]
(paddr->pfield, pbuf, paddr);