Browse Source

fix fatfs get chain last entry broken memory.

Change-Id: I8608ba1d97ab80c424c381bd9eb9f27fcc3f1dfa
Signed-off-by: QiaoChong <qiaochong@loongson.cn>
master
QiaoChong 5 years ago
parent
commit
e5b78faddf
  1. 2
      pmon/fs/fatfs.c

2
pmon/fs/fatfs.c

@ -958,9 +958,9 @@ int fat_getChain(struct fat_sc *fsc, int start, struct fatchain *chain)
while(1) while(1)
{ {
entry = getFatEntry(fsc, flag); entry = getFatEntry(fsc, flag);
chain->entries[i+1] = entry;
if(entry >= (CLUST_EOFE & mask)) if(entry >= (CLUST_EOFE & mask))
break; break;
chain->entries[i+1] = entry;
flag = entry; flag = entry;
i++; i++;
} }

Loading…
Cancel
Save