summaryrefslogtreecommitdiffstats
path: root/firmware/drivers/fat.c
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/drivers/fat.c')
-rw-r--r--firmware/drivers/fat.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/firmware/drivers/fat.c b/firmware/drivers/fat.c
index 5d430dd24e..758e48cdbd 100644
--- a/firmware/drivers/fat.c
+++ b/firmware/drivers/fat.c
@@ -819,11 +819,11 @@ static int update_fat_entry(IF_MV2(struct bpb* fat_bpb,)
}
if ( val ) {
- if (htole16(sec[offset]) == 0x0000 && fat_bpb->fsinfo.freecount > 0)
+ if (letoh16(sec[offset]) == 0x0000 && fat_bpb->fsinfo.freecount > 0)
fat_bpb->fsinfo.freecount--;
}
else {
- if (htole16(sec[offset]))
+ if (letoh16(sec[offset]))
fat_bpb->fsinfo.freecount++;
}
@@ -854,12 +854,12 @@ static int update_fat_entry(IF_MV2(struct bpb* fat_bpb,)
}
if ( val ) {
- if (!(htole32(sec[offset]) & 0x0fffffff) &&
+ if (!(letoh32(sec[offset]) & 0x0fffffff) &&
fat_bpb->fsinfo.freecount > 0)
fat_bpb->fsinfo.freecount--;
}
else {
- if (htole32(sec[offset]) & 0x0fffffff)
+ if (letoh32(sec[offset]) & 0x0fffffff)
fat_bpb->fsinfo.freecount++;
}