[Chinese-commits] [lunar] 01/04: Fix incorrect year in lunar-to-solar conversion

Anthony Fok foka at debian.org
Sun Sep 20 07:06:53 UTC 2015


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

foka pushed a commit to branch master
in repository lunar.

commit f708507f1126d2efbd17e79cb978224cc81eefbc
Author: Anthony Fok <foka at debian.org>
Date:   Sun Sep 20 00:49:10 2015 -0600

    Fix incorrect year in lunar-to-solar conversion
    
    Thanks to Xie Xun for catching my mistaken removal of the call
    to make_yday() in 2.2-4.  (Closes: #792472)
---
 debian/patches/02_fix_compiler_warnings.diff | 16 ++++++++++++----
 1 file changed, 12 insertions(+), 4 deletions(-)

diff --git a/debian/patches/02_fix_compiler_warnings.diff b/debian/patches/02_fix_compiler_warnings.diff
index 6b0b59a..e872670 100644
--- a/debian/patches/02_fix_compiler_warnings.diff
+++ b/debian/patches/02_fix_compiler_warnings.diff
@@ -9,9 +9,16 @@ Description: Fix GCC compiler warnings found in lunar.c
   * variable ‘nYear’ set but not used
  .
  First applied since 2.2-1; revised in 2.2-3 and 2.2-4.
-Author: Anthony Fok <foka at debian.org>
-Origin: vendor
-Last-Update: 2013-10-04
+ .
+ In July 2015, Xie Xun found a bug where lunar 2.2-4 always outputs
+ Solar Year 1900 no matter what the date of lunar-to-solar conversion is,
+ and traced to a bug that I (Anthony) introduced in 2.2-4: When I removed
+ the unused ‘nYear’ variable, I had mistakenly removed the necessary call
+ to make_yday().  Xie Xun’s report and patch in Bug #792472 fixes the bug.
+Author: Anthony Fok <foka at debian.org>, Xie Xun <xiexun162534 at gmail.com>
+Origin: vendor, https://bugs.debian.org/cgi-bin/bugreport.cgi?msg=10;bug=792472
+Bug-Debian: https://bugs.debian.org/792472
+Last-Update: 2015-09-19
 ---
 This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
 --- a/lunar.c
@@ -60,7 +67,7 @@ This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
  #define BYEAR		1201
  /* BYEAR % 4 == 1  and BYEAR % 400 == 1 for easy calculation of leap years */
  /* assert(BYEAR <= SolarFirstDate.year) */
-@@ -328,9 +326,8 @@ long Lunar2Day(d)
+@@ -328,9 +326,9 @@ long Lunar2Day(d)
  Date *d;
  {
      long offset = 0;
@@ -68,6 +75,7 @@ This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
 +    int year, i, m, leapMonth;
  
 -    nYear = make_yday();
++    make_yday();
      year = d->year - LunarFirstDate.year;
      for (i=0; i<year; i++)
  	offset += yday[i];

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/chinese/lunar.git



More information about the Chinese-commits mailing list