diff options
-rw-r--r-- | fs/fat/fat.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/fat/fat.c b/fs/fat/fat.c index 393c378..25d3318 100644 --- a/fs/fat/fat.c +++ b/fs/fat/fat.c @@ -569,9 +569,9 @@ static __u8 mkcksum(const char name[8], const char ext[3]) __u8 ret = 0; - for (i = 0; i < sizeof(name); i++) + for (i = 0; i < 8; i++) ret = (((ret & 1) << 7) | ((ret & 0xfe) >> 1)) + name[i]; - for (i = 0; i < sizeof(ext); i++) + for (i = 0; i < 3; i++) ret = (((ret & 1) << 7) | ((ret & 0xfe) >> 1)) + ext[i]; return ret; |