mirror of
https://github.com/matrix-construct/construct
synced 2024-11-25 00:02:34 +01:00
ircd::rfc3986: Fix errant signed integer check w/ qi::int_parser.
This commit is contained in:
parent
cd4b1714d9
commit
d978a02b91
1 changed files with 5 additions and 5 deletions
|
@ -435,22 +435,22 @@ namespace ircd::rfc3986::parser::decoder
|
|||
|
||||
static const auto is_safe
|
||||
{
|
||||
[](const char val, auto &c, bool &pass)
|
||||
[](const int8_t val, auto &c, bool &pass)
|
||||
{
|
||||
pass = (val > 0x1F) | (val < 0x00);
|
||||
attr_at<0>(c) = val;
|
||||
}
|
||||
};
|
||||
|
||||
const expr decode_char
|
||||
const rule<char()> decode_char_safe
|
||||
{
|
||||
lit('%') >> qi::int_parser<char, 16, 2, 2>{}
|
||||
lit('%') > qi::int_parser<uint8_t, 16, 2, 2>{}[is_safe]
|
||||
,"url decodable character"
|
||||
};
|
||||
|
||||
const rule<char()> decode_char_safe
|
||||
const expr decode_char
|
||||
{
|
||||
lit('%') > qi::int_parser<char, 16, 2, 2>{}[is_safe]
|
||||
lit('%') >> qi::int_parser<uint8_t, 16, 2, 2>{}
|
||||
,"url decodable character"
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue