Make sure index into hex array is positive
This commit is contained in:
@@ -729,7 +729,7 @@ void lastLeqMulti(Arena &arena, Node *root, std::span<Key> keys,
|
||||
for (auto iter = extrema(node, false); iter != nullptr;) {
|
||||
auto *next = ::next(iter, true);
|
||||
std::string key;
|
||||
for (auto c : std::string_view((const char *)(iter + 1), iter->len)) {
|
||||
for (uint8_t c : std::string_view((const char *)(iter + 1), iter->len)) {
|
||||
key += "x";
|
||||
key += "0123456789abcdef"[c / 16];
|
||||
key += "0123456789abcdef"[c % 16];
|
||||
@@ -1200,7 +1200,7 @@ struct ReferenceImpl {
|
||||
void printLogical(std::string &result) {
|
||||
for (const auto &[k, v] : writeVersionMap) {
|
||||
std::string key;
|
||||
for (auto c : k) {
|
||||
for (uint8_t c : k) {
|
||||
key += "x";
|
||||
key += "0123456789abcdef"[c / 16];
|
||||
key += "0123456789abcdef"[c % 16];
|
||||
|
Reference in New Issue
Block a user