From 3e8a12d8f79f54b55f5c1dcdae713d153d6b9c79 Mon Sep 17 00:00:00 2001
From: Matthieu Schaller <schaller@strw.leidenuniv.nl>
Date: Tue, 17 Sep 2019 14:44:21 +0200
Subject: [PATCH] Do not set a default value for Stars:birth_time

---
 src/stars/EAGLE/stars_io.h | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/stars/EAGLE/stars_io.h b/src/stars/EAGLE/stars_io.h
index fc898c5587..9f82738cb1 100644
--- a/src/stars/EAGLE/stars_io.h
+++ b/src/stars/EAGLE/stars_io.h
@@ -222,8 +222,10 @@ INLINE static void stars_props_init(struct stars_props *sp,
       parser_get_opt_param_int(params, "Stars:overwrite_birth_time", 0);
 
   /* Read birth time to set all stars in ICs */
-  sp->spart_first_init_birth_time =
-      parser_get_opt_param_float(params, "Stars:birth_time", -1.f);
+  if (sp->overwrite_birth_time) {
+    sp->spart_first_init_birth_time =
+      parser_get_param_float(params, "Stars:birth_time");
+  }
 }
 
 /**
-- 
GitLab