mirror of
https://github.com/XRPLF/rippled.git
synced 2026-09-26 23:19:07 +00:00
The C-string overload of setAttribute handed its pointer straight to std::string_view, whose pointer constructor reads the pointer to find the length. A null one is undefined behaviour. A null pointer carries no text, and an empty value already means something on this class, so nothing is recorded rather than an empty string. The overload itself has to stay. Without it a string literal would bind to the bool overload, because pointer-to-bool is a standard conversion and beats the string_view one, so every string attribute would silently record true. The header now records that.