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.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/firmware/drivers/fat.c b/firmware/drivers/fat.c
index dd0d4d6..9dd27cf 100644
--- a/firmware/drivers/fat.c
+++ b/firmware/drivers/fat.c
@@ -1202,6 +1202,10 @@ static int fat_checkname(const unsigned char* newname)
return -1;
newname++;
}
+ /* check trailing space(s) */
+ if(*(--newname) == ' ')
+ return -1;
+
return 0;
}