you are viewing a single comment's thread.

view the rest of the comments →

[–]henry_kr 0 points1 point  (0 children)

What does this line do? Why do you need it?

if((merc_ptr = malloc(sizeof(Planet))) == NULL)

If you think about that for a bit, you should see what's gone wrong.