VirtualBox

Changeset 88200 in vbox for trunk/src


Ignore:
Timestamp:
Mar 18, 2021 11:19:57 PM (4 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
143363
Message:

IPRT/%RTbool: Drop the trialing space on true, only output it when '#' is specified. (Yeah, this may break column printing, but probably nothing overly important. This has been a long standing annoyance.)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/common/string/strformatrt.cpp

    r84207 r88200  
    521521                        static const char s_szTrue[]  = "true ";
    522522                        static const char s_szFalse[] = "false";
    523                         if (u.u64 == 1)
    524                             return pfnOutput(pvArgOutput, s_szTrue,  sizeof(s_szTrue) - 1);
     523                        if (u.u64 == 1) /* 2021-03-19: Only trailing space for %#RTbool. */
     524                            return pfnOutput(pvArgOutput, s_szTrue, sizeof(s_szTrue) - (fFlags & RTSTR_F_SPECIAL ? 1 : 2));
    525525                        if (u.u64 == 0)
    526526                            return pfnOutput(pvArgOutput, s_szFalse, sizeof(s_szFalse) - 1);
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette