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:
parent
c4dba16740
commit
2159cb9aec
1 changed files with 2 additions and 2 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue