[Debian-astro-commits] [gyoto] 112/221: Bug fix in Photon::hit(), where Astrobj::Generic::Impact() was called with bogus indices

Thibaut Jean-Claude Paumard thibaut at moszumanska.debian.org
Fri May 22 20:52:38 UTC 2015


This is an automated email from the git hooks/post-receive script.

thibaut pushed a commit to branch master
in repository gyoto.

commit a8b849a195f85546a6179d891de7d55de7e580a6
Author: Thibaut Paumard <paumard at users.sourceforge.net>
Date:   Wed Nov 26 23:09:50 2014 +0100

    Bug fix in Photon::hit(), where Astrobj::Generic::Impact() was called with bogus indices
---
 lib/Photon.C | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/Photon.C b/lib/Photon.C
index 1f1cd18..f31d7da 100644
--- a/lib/Photon.C
+++ b/lib/Photon.C
@@ -235,9 +235,9 @@ int Photon::hit(Astrobj::Properties *data) {
     default:
       throwError("Incompatible coordinate kind in Photon.C");
     }
+    if (rr<rmax)
+      hitt = object_ -> Impact(this, ind, data);
   }
-  if (rr<rmax)
-    hitt = object_ -> Impact(this, ind, data);
   if (hitt) {
 #   if GYOTO_DEBUG_ENABLED
     GYOTO_DEBUG << "DEBUG: Photon.C: Hit for already computed position; "

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-astro/packages/gyoto.git



More information about the Debian-astro-commits mailing list