1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-22 19:45:08 +00:00

Shell: Use size_t for SH_DEBUG vector iteration

We missed this when switching to size_t for vector sizing as this
code is not normally compiled.
This commit is contained in:
Shannon Booth 2020-03-22 10:14:12 +13:00 committed by Andreas Kling
parent ec6e55cfc6
commit d806dfe801

View file

@ -755,15 +755,15 @@ static int run_command(const String& cmd)
#ifdef SH_DEBUG
for (auto& command : commands) {
for (int i = 0; i < command.subcommands.size(); ++i) {
for (int j = 0; j < i; ++j)
for (size_t i = 0; i < command.subcommands.size(); ++i) {
for (size_t j = 0; j < i; ++j)
dbgprintf(" ");
for (auto& arg : command.subcommands[i].args) {
dbgprintf("<%s> ", arg.characters());
}
dbgprintf("\n");
for (auto& redirecton : command.subcommands[i].redirections) {
for (int j = 0; j < i; ++j)
for (size_t j = 0; j < i; ++j)
dbgprintf(" ");
dbgprintf(" ");
switch (redirecton.type) {