summaryrefslogtreecommitdiff
path: root/firmware/drivers/fat.c
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/drivers/fat.c')
-rw-r--r--firmware/drivers/fat.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/firmware/drivers/fat.c b/firmware/drivers/fat.c
index a3ed62e4bc..2ff36e2595 100644
--- a/firmware/drivers/fat.c
+++ b/firmware/drivers/fat.c
@@ -841,7 +841,6 @@ static int add_dir_entry(struct fat_dir* dir,
841 entries_found = entries_needed; 841 entries_found = entries_needed;
842 LDEBUGF("Found last entry %d\n", 842 LDEBUGF("Found last entry %d\n",
843 sector * DIR_ENTRIES_PER_SECTOR + i); 843 sector * DIR_ENTRIES_PER_SECTOR + i);
844 last = true;
845 done = true; 844 done = true;
846 break; 845 break;
847 846
@@ -873,7 +872,9 @@ static int add_dir_entry(struct fat_dir* dir,
873 872
874 /* if we're not extending the dir, 873 /* if we're not extending the dir,
875 we must go back to first free entry */ 874 we must go back to first free entry */
876 if (!last) 875 if (done)
876 last = true;
877 else
877 firstentry -= (entries_needed - 1); 878 firstentry -= (entries_needed - 1);
878 } 879 }
879 } 880 }
@@ -951,6 +952,7 @@ unsigned char char2dos(unsigned char c)
951 case 0xe5: /* Special kanji character */ 952 case 0xe5: /* Special kanji character */
952 c = 0x05; 953 c = 0x05;
953 break; 954 break;
955 case 0x20:
954 case 0x22: 956 case 0x22:
955 case 0x2a: 957 case 0x2a:
956 case 0x2b: 958 case 0x2b: