ciao!

hai provato

codice:
while(i->next != NULL)
invece di:

codice:
while(i->next != '\0')