// There are unvalidated users. Traverse the user database, and return the first user we find that needs validation.
cdb_rewind(CDB_USERS);
- while (cdbus = cdb_next_item(CDB_USERS), cdbus.len>0) {
+ while (cdbus = cdb_next_item(CDB_USERS), cdbus.ptr!=NULL) {
memset(&usbuf, 0, sizeof(struct ctdluser));
memcpy(&usbuf, cdbus.ptr, ((cdbus.len > sizeof(struct ctdluser)) ? sizeof(struct ctdluser) : cdbus.len));
if ((usbuf.flags & US_NEEDVALID) && (usbuf.axlevel > AxDeleted)) {