patch 9.1.1437: MS-Windows: internal compile error in uc_list()
Problem: MS-Windows: internal compile error in uc_list() with VS 17.14
(ibear)
Solution: refactor code slightly (Mike Williams)
fixes: #17402
closes: #17464
Signed-off-by: Mike Williams <mrmrdubya@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
diff --git a/src/usercmd.c b/src/usercmd.c
index ded11e7..9f1efb4 100644
--- a/src/usercmd.c
+++ b/src/usercmd.c
@@ -600,17 +600,21 @@
msg_putchar('|');
--len;
}
- while (len-- > 0)
- msg_putchar(' ');
+ if (len != 0)
+ msg_puts(&" "[4 - len]);
msg_outtrans_attr(cmd->uc_name, HL_ATTR(HLF_D));
len = (int)cmd->uc_namelen + 4;
- do
+ if (len < 21)
{
- msg_putchar(' ');
- ++len;
- } while (len < 22);
+ // Field padding spaces 12345678901234567
+ static char spaces[18] = " ";
+ msg_puts(&spaces[len - 4]);
+ len = 21;
+ }
+ msg_putchar(' ');
+ ++len;
// "over" is how much longer the name is than the column width for
// the name, we'll try to align what comes after.