forked from len0rd/rockbox
Added check to avoid FAT sector 0 panic.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@2850 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
4cde17d1ca
commit
a69e98d7cc
1 changed files with 2 additions and 1 deletions
|
@ -981,7 +981,8 @@ int fat_truncate(struct fat_file *file)
|
|||
next = get_next_cluster(last);
|
||||
update_fat_entry(last,0);
|
||||
}
|
||||
update_fat_entry(file->lastcluster,FAT_EOF_MARK);
|
||||
if (file->lastcluster)
|
||||
update_fat_entry(file->lastcluster,FAT_EOF_MARK);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue