Albert Chin found another signed/unsigned problem in the date and time
authorDaniel Veillard <veillard@src.gnome.org>
Mon, 21 Nov 2005 11:23:58 +0000 (11:23 +0000)
committerDaniel Veillard <veillard@src.gnome.org>
Mon, 21 Nov 2005 11:23:58 +0000 (11:23 +0000)
* libexslt/date.c: Albert Chin found another signed/unsigned problem
  in the date and time code raised on IRIX 6.5
Daniel

ChangeLog
libexslt/date.c

index 138e3a5..1203ccd 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Mon Nov 21 12:22:21 CET 2005 Daniel Veillard <daniel@veillard.com>
+
+       * libexslt/date.c: Albert Chin found another signed/unsigned problem
+         in the date and time code raised on IRIX 6.5
+
 Mon Nov 21 12:08:05 CET 2005 Daniel Veillard <daniel@veillard.com>
 
        * libexslt/crypto.c: patch from Albert Chin needed for HP-UX
index c533d4d..37aa888 100644 (file)
@@ -1518,8 +1518,8 @@ _exsltDateAdd (exsltDateValPtr dt, exsltDateValPtr dur)
 
     while (1) {
         if (tempdays < 1) {
-            long tmon = (long)MODULO_RANGE(r->mon-1, 1, 13);
-            long tyr  = r->year + (long)FQUOTIENT_RANGE(r->mon-1, 1, 13);
+            long tmon = (long)MODULO_RANGE((int)r->mon-1, 1, 13);
+            long tyr  = r->year + (long)FQUOTIENT_RANGE((int)r->mon-1, 1, 13);
             if (tyr == 0)
                 tyr--;
             tempdays += MAX_DAYINMONTH(tyr, tmon);