diff options
-rw-r--r-- | sbin/fsck_msdos/fat.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sbin/fsck_msdos/fat.c b/sbin/fsck_msdos/fat.c index 36b0c8d08c3..9ed3137ad52 100644 --- a/sbin/fsck_msdos/fat.c +++ b/sbin/fsck_msdos/fat.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fat.c,v 1.8 1999/09/06 12:39:58 espie Exp $ */ +/* $OpenBSD: fat.c,v 1.9 2000/06/28 17:42:06 mickey Exp $ */ /* $NetBSD: fat.c,v 1.8 1997/10/17 11:19:53 ws Exp $ */ /* @@ -35,7 +35,7 @@ #ifndef lint -static char rcsid[] = "$OpenBSD: fat.c,v 1.8 1999/09/06 12:39:58 espie Exp $"; +static char rcsid[] = "$OpenBSD: fat.c,v 1.9 2000/06/28 17:42:06 mickey Exp $"; #endif /* not lint */ #include <stdlib.h> @@ -368,7 +368,8 @@ checkfat(boot, fat) /* follow the chain and mark all clusters on the way */ for (len = 0, p = head; - p >= CLUST_FIRST && p < boot->NumClusters; + p >= CLUST_FIRST && p < boot->NumClusters && + fat[p].head != head; p = fat[p].next) { fat[p].head = head; len++; |