diff options
author | Nat Goodspeed <nat@lindenlab.com> | 2020-05-14 08:54:15 -0400 |
---|---|---|
committer | Nat Goodspeed <nat@lindenlab.com> | 2020-05-14 08:54:15 -0400 |
commit | a83da3a4525bf855c6c68c34dfbc8d93941d6174 (patch) | |
tree | c819238299d322769662cbd25d4ce709b5457366 /indra/llcommon/llsdserialize.cpp | |
parent | 6e5242f0a4e8a2e9cd9f21e89fae4870d1acceca (diff) |
DRTVWR-476: Make LLSDFormatter::OPTIONS_PRETTY_BINARY uppercase
for compatibility with Python llbase.llsd.parse().
The Python parse() currently requires uppercase hex digits for b16"hex"
coding; lowercase hex digits cause it to raise LLSDParseError.
Diffstat (limited to 'indra/llcommon/llsdserialize.cpp')
-rw-r--r-- | indra/llcommon/llsdserialize.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/indra/llcommon/llsdserialize.cpp b/indra/llcommon/llsdserialize.cpp index 598bec0558..022a5d4659 100644 --- a/indra/llcommon/llsdserialize.cpp +++ b/indra/llcommon/llsdserialize.cpp @@ -1423,6 +1423,10 @@ S32 LLSDNotationFormatter::format_impl(const LLSD& data, std::ostream& ostr, { std::ios_base::fmtflags old_flags = ostr.flags(); ostr.setf( std::ios::hex, std::ios::basefield ); + // It shouldn't strictly matter whether the emitted hex digits + // are uppercase; LLSDNotationParser handles either; but as of + // 2020-05-13, Python's llbase.llsd requires uppercase hex. + ostr << std::uppercase; auto oldfill(ostr.fill('0')); auto oldwidth(ostr.width()); for (int i = 0; i < buffer.size(); i++) |