1
0
Fork 0

Use correct type for printf field size specifier

Formatting options for printf family of functions use int as a type
for formatting a field size.
This commit is contained in:
Patryk Obara 2020-01-03 19:36:52 +01:00 committed by Patryk Obara
parent c4dba16740
commit 2159cb9aec

View file

@ -649,8 +649,8 @@ void DOS_Shell::CMD_DIR(char * args) {
//
if (optW) {
if (is_dir) {
const size_t namelen = strlen(name);
WriteOut("[%s]%*s", name, (14 - namelen), "");
const int length = static_cast<int>(strlen(name));
WriteOut("[%s]%*s", name, (14 - length), "");
} else {
WriteOut("%-16s", name);
}