Doesn't segfault, but I think it's broken

I need to do some tests to figure out exactly what's going wrong