aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2010-01-25 09:28:26 -0800
committerH. Peter Anvin <hpa@zytor.com>2010-01-25 09:28:26 -0800
commit5964900d2335a6d84a63e89fb0e7e302aeae4da3 (patch)
tree4ca734e50de49dec68242dae8755b45f30bf04e3
parente7dc052ed537428dc69fcf18ef354e9e00973003 (diff)
downloadsyslinux.git-5964900d2335a6d84a63e89fb0e7e302aeae4da3.tar.gz
syslinux.git-5964900d2335a6d84a63e89fb0e7e302aeae4da3.tar.xz
syslinux.git-5964900d2335a6d84a63e89fb0e7e302aeae4da3.zip
FAT: handle the cluster number being 1
Any reference to cluster 1 is an error, so treat it the same as cluster 0 or one of the EOF cluster numbers. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
-rw-r--r--core/fs/fat/fat.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/fs/fat/fat.c b/core/fs/fat/fat.c
index ce3cae6a..21dda90f 100644
--- a/core/fs/fat/fat.c
+++ b/core/fs/fat/fat.c
@@ -128,7 +128,7 @@ static sector_t get_next_sector(struct fs_info* fs, uint32_t sector)
/* get a new cluster */
cluster = get_next_cluster(fs, (data_sector >> FAT_SB(fs)->clust_shift) + 2);
- if (!cluster )
+ if (cluster < 2)
return 0;
/* return the start of the new cluster */