I'm working on a hash table project using chaining to resolve collisions and I have a weird bug I can't figure out. Adding multiple items to one index works unless they are the only items in the whole hash table. If I try and add two items to one index on an otherwise empty table I get a seg fault. Weirdly I don't always get the seg fault. Here is my hash function, my rehash function and my add function.