1
0
Fork 0
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:
Björn Stenberg 2002-11-14 22:17:41 +00:00
parent 4cde17d1ca
commit a69e98d7cc

View file

@ -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;
}