pAddr->contactId = pDbHandle->getColumnToInt(index++);
pDbHandle->getColumnToString(index++, MAX_ADDRESS_VAL_LEN, pAddr->addressVal);
pDbHandle->getColumnToString(index++, MAX_DISPLAY_NAME_LEN, pAddr->displayName);
- if(!strlen(pAddr->displayName))
- {
+ if(!strlen(pAddr->displayName)) {
pDbHandle->getColumnToString(index++,MAX_DISPLAY_NAME_LEN, firstName);
pDbHandle->getColumnToString(index++,MAX_DISPLAY_NAME_LEN, lastName);
strncat(pAddr->displayName, firstName, MAX_DISPLAY_NAME_LEN-strlen(pAddr->displayName));
}
}
+ } else {
+ index++; // firstname
+ index++; // lastname
}
}