In the function add_list, the line
for (i = 0; i < list.uxNumberOfItems + 1; i++)
should be, I think:
for (i = 0; i < list.uxNumberOfItems; i++)
Thanks for taking the time to provide the information.