diff options
Diffstat (limited to 'firmware/drivers')
-rw-r--r-- | firmware/drivers/fat.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/firmware/drivers/fat.c b/firmware/drivers/fat.c index ef6ee8b2ef..5cc47be2cf 100644 --- a/firmware/drivers/fat.c +++ b/firmware/drivers/fat.c | |||
@@ -981,7 +981,8 @@ int fat_truncate(struct fat_file *file) | |||
981 | next = get_next_cluster(last); | 981 | next = get_next_cluster(last); |
982 | update_fat_entry(last,0); | 982 | update_fat_entry(last,0); |
983 | } | 983 | } |
984 | update_fat_entry(file->lastcluster,FAT_EOF_MARK); | 984 | if (file->lastcluster) |
985 | update_fat_entry(file->lastcluster,FAT_EOF_MARK); | ||
985 | 986 | ||
986 | return 0; | 987 | return 0; |
987 | } | 988 | } |