]> git.itanic.dy.fi Git - sdl-planets/commitdiff
main.c: Prune planets correctly
authorTimo Kokkonen <kaapeli@itanic.dy.fi>
Mon, 12 Apr 2010 17:33:33 +0000 (20:33 +0300)
committerTimo Kokkonen <kaapeli@itanic.dy.fi>
Mon, 12 Apr 2010 17:33:33 +0000 (20:33 +0300)
main.c

diff --git a/main.c b/main.c
index 4dab322e19684bd6f9939b6fb44044b222b9d9ce..fb15d012097f9051666f2c284c95a7863ae20919 100644 (file)
--- a/main.c
+++ b/main.c
@@ -222,7 +222,7 @@ static void loop(SDL_Surface *screen, int num_of_planets, double total_mass,
 
                gravitize_planet_tree(planet_root, step_time);
 
-               prune_planet_tree(planet_root);
+               planet_root = prune_planet_tree(planet_root);
 
                list_for_each_entry(pl1, &planet_root->list, list) {
                        planet_root = move_planet(pl1, step_time);