mirror of
https://github.com/wiiu-env/libfat.git
synced 2024-11-27 02:30:56 +00:00
fix patching error
This commit is contained in:
parent
660461f0f8
commit
d6ac947826
@ -975,14 +975,12 @@ bool _FAT_directory_addEntry (PARTITION* partition, DIR_ENTRY* entry, uint32_t d
|
||||
i = 0;
|
||||
j = MAX_ALIAS_PRI_LENGTH;
|
||||
// Move extension to last 3 characters
|
||||
while (alias[i] != '.' && alias[i] != '\0') i--;
|
||||
while (alias[i] != '.' && alias[i] != '\0') i++;
|
||||
if (i < j) {
|
||||
j = MAX_ALIAS_LENGTH - MAX_ALIAS_EXT_LENGTH - 2; // 1 char for '.', one for NUL, 3 for extension
|
||||
memmove (alias + j, alias + i, aliasLen - i + 1);
|
||||
// Pad primary component
|
||||
memset (alias + i, '_', j - i);
|
||||
}
|
||||
|
||||
// Generate numeric tail
|
||||
for (i = 1; i <= MAX_NUMERIC_TAIL; i++) {
|
||||
j = i;
|
||||
|
Loading…
Reference in New Issue
Block a user