summaryrefslogtreecommitdiffstats
path: root/sys/fs/msdosfs/msdosfs_conv.c
diff options
context:
space:
mode:
authorbde <bde@FreeBSD.org>1996-12-04 13:42:09 +0000
committerbde <bde@FreeBSD.org>1996-12-04 13:42:09 +0000
commit7d71d37962f4b350f895472d3011f9ba0103e483 (patch)
treea6ea1c0273df9501b719698981d16cf771edf985 /sys/fs/msdosfs/msdosfs_conv.c
parent9b86a34b6bfb9cbcc5a27abcb20aafc2816fce6e (diff)
downloadFreeBSD-src-7d71d37962f4b350f895472d3011f9ba0103e483.zip
FreeBSD-src-7d71d37962f4b350f895472d3011f9ba0103e483.tar.gz
Fixed an off by 1 error in unix2dostime(). The first day of each month
was converted to the last day of the previous month. This bug was introduced in the optimizations in rev.1.4.
Diffstat (limited to 'sys/fs/msdosfs/msdosfs_conv.c')
-rw-r--r--sys/fs/msdosfs/msdosfs_conv.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/fs/msdosfs/msdosfs_conv.c b/sys/fs/msdosfs/msdosfs_conv.c
index 18e92fb..024e3c7 100644
--- a/sys/fs/msdosfs/msdosfs_conv.c
+++ b/sys/fs/msdosfs/msdosfs_conv.c
@@ -1,4 +1,4 @@
-/* $Id: msdosfs_conv.c,v 1.9 1996/04/05 18:59:06 ache Exp $ */
+/* $Id: msdosfs_conv.c,v 1.10 1996/09/19 18:20:43 nate Exp $ */
/* $NetBSD: msdosfs_conv.c,v 1.6.2.1 1994/08/30 02:27:57 cgd Exp $ */
/*
@@ -101,7 +101,7 @@ unix2dostime(tsp, ddp, dtp)
days -= inc;
}
months = year & 0x03 ? regyear : leapyear;
- for (month = 0; days > months[month]; month++)
+ for (month = 0; days >= months[month]; month++)
;
if (month > 0)
days -= months[month - 1];
OpenPOWER on IntegriCloud