Codechange: Make FiosItem's name and title std::string

This commit is contained in:
Rubidium
2023-04-16 21:56:10 +02:00
committed by rubidium42
parent ee723f26ba
commit 3a822fcd01
6 changed files with 37 additions and 40 deletions

View File

@@ -76,11 +76,12 @@ void FiosGetDrives(FileList &file_list)
fios->type = FIOS_TYPE_DRIVE;
fios->mtime = 0;
#ifndef __INNOTEK_LIBC__
snprintf(fios->name, lengthof(fios->name), "%c:", 'A' + disk - 1);
fios->name += 'A' + disk - 1;
#else
snprintf(fios->name, lengthof(fios->name), "%c:", disk);
fios->name += (char)disk;
#endif
strecpy(fios->title, fios->name, lastof(fios->title));
fios->name += ':';
fios->title = fios->name;
}
}