diff options
Diffstat (limited to 'sci-astronomy/stellarium/files/stellarium-0.22.1-fix-conv.patch')
-rw-r--r-- | sci-astronomy/stellarium/files/stellarium-0.22.1-fix-conv.patch | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/sci-astronomy/stellarium/files/stellarium-0.22.1-fix-conv.patch b/sci-astronomy/stellarium/files/stellarium-0.22.1-fix-conv.patch new file mode 100644 index 000000000000..5187837fbb61 --- /dev/null +++ b/sci-astronomy/stellarium/files/stellarium-0.22.1-fix-conv.patch @@ -0,0 +1,23 @@ +From dd65fdf5a332d62834ac1cfe9639e220ea635c55 Mon Sep 17 00:00:00 2001 +From: "Alexander V. Wolf" <alex.v.wolf@gmail.com> +Date: Wed, 25 May 2022 20:55:15 +0700 +Subject: [PATCH] Fixed conversion tool radToHms(): avoiding possible negative + zero for value of seconds (see #2460) + +--- + src/core/StelUtils.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/core/StelUtils.cpp b/src/core/StelUtils.cpp +index 93a55ebb957..b03f55a68ec 100644 +--- a/src/core/StelUtils.cpp ++++ b/src/core/StelUtils.cpp +@@ -140,7 +140,7 @@ void radToHms(double angle, unsigned int& h, unsigned int& m, double& s) + + h = static_cast<unsigned int>(angle); + m = static_cast<unsigned int>((angle-h)*60); +- s = (angle-h)*3600.-60.*m; ++ s = qAbs((angle-h)*3600.-60.*m); + } + + /************************************************************************* |