mirror of
https://github.com/wiiu-env/libfat.git
synced 2024-11-22 01:49:17 +01: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;
|
i = 0;
|
||||||
j = MAX_ALIAS_PRI_LENGTH;
|
j = MAX_ALIAS_PRI_LENGTH;
|
||||||
// Move extension to last 3 characters
|
// Move extension to last 3 characters
|
||||||
while (alias[i] != '.' && alias[i] != '\0') i--;
|
while (alias[i] != '.' && alias[i] != '\0') i++;
|
||||||
if (i < j) {
|
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);
|
memmove (alias + j, alias + i, aliasLen - i + 1);
|
||||||
// Pad primary component
|
// Pad primary component
|
||||||
memset (alias + i, '_', j - i);
|
memset (alias + i, '_', j - i);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Generate numeric tail
|
// Generate numeric tail
|
||||||
for (i = 1; i <= MAX_NUMERIC_TAIL; i++) {
|
for (i = 1; i <= MAX_NUMERIC_TAIL; i++) {
|
||||||
j = i;
|
j = i;
|
||||||
|
Loading…
Reference in New Issue
Block a user