diff options
author | John Hodge <tpg@ucc.asn.au> | 2017-03-21 21:35:50 +0800 |
---|---|---|
committer | John Hodge <tpg@ucc.asn.au> | 2017-03-21 21:35:50 +0800 |
commit | c8b1ef8df0cd0a30d8e48f786286c70fbb77f4c1 (patch) | |
tree | b354f5f38e8db93e2b89e623ab1b3e193aeda376 /src/expand | |
parent | eb21c4268d54c3c71e54b273bd364006d2f82f45 (diff) | |
download | mrust-c8b1ef8df0cd0a30d8e48f786286c70fbb77f4c1.tar.gz |
format_args! - Add # support
Diffstat (limited to 'src/expand')
-rw-r--r-- | src/expand/format_args.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/expand/format_args.cpp b/src/expand/format_args.cpp index 775326cd..0f881a6e 100644 --- a/src/expand/format_args.cpp +++ b/src/expand/format_args.cpp @@ -660,7 +660,10 @@ class CFormatArgsExpander: push_toks(toks, TOK_COMMA); push_toks(toks, Token(TOK_IDENT, "flags"), TOK_COLON); - push_toks(toks, Token(uint64_t(0), CORETYPE_U32)); + uint64_t flags = 0; + if(frag.args.alternate) + flags |= 1 << 2; + push_toks(toks, Token(uint64_t(flags), CORETYPE_U32)); push_toks(toks, TOK_COMMA); push_toks(toks, Token(TOK_IDENT, "precision"), TOK_COLON ); |