From e4093ed988a6e468b069d3eb1eada33b2b07498e Mon Sep 17 00:00:00 2001 From: Aurora Date: Sun, 13 Nov 2016 18:39:35 +0100 Subject: [PATCH] Minor stuff --- source/fs.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/source/fs.c b/source/fs.c index 01a2dd4..046629b 100644 --- a/source/fs.c +++ b/source/fs.c @@ -194,14 +194,13 @@ void payloadMenu(void) if(f_opendir(&dir, path) == FR_OK) { - u32 payloadNum = 0; - FILINFO info; + u32 payloadNum = 0; char payloadList[21][_MAX_LFN + 1]; while(f_readdir(&dir, &info) == FR_OK && info.fname[0] != 0 && payloadNum < 21) if(info.fname[0] != '.' && memcmp(info.altname + 8, ".BIN", 4) == 0 && strlen(info.fname) < 50) - memcpy(payloadList[payloadNum++], info.fname, sizeof(info.fname)); + memcpy(payloadList[payloadNum++], info.fname, strlen(info.fname) + 1); f_closedir(&dir);