diff --git a/lib/rpmtd.c b/lib/rpmtd.c index e33c8cb53..41c6a50e8 100644 --- a/lib/rpmtd.c +++ b/lib/rpmtd.c @@ -210,12 +210,12 @@ const char * rpmtdGetString(rpmtd td) uint64_t rpmtdGetNumber(rpmtd td) { - uint64_t val = 0; - int ix = (td->ix >= 0 ? td->ix : 0); - if (td == NULL) return 0; + uint64_t val = 0; + int ix = (td->ix >= 0 ? td->ix : 0); + switch (td->type) { case RPM_INT64_TYPE: val = *((uint64_t *) td->data + ix);