Fix: fmt's {:#04X} yields '0X00', not '0x0000'

Technically the 0X vs 0x is not a big problem, just not pretty. However, the
length also including the 0x results in unexpected behaviour, so it probably
better to not use it.
This commit is contained in:
Rubidium
2023-04-20 17:00:46 +02:00
committed by rubidium42
parent 27b4b5d0a0
commit 7b539fa7c9
5 changed files with 82 additions and 82 deletions

View File

@@ -254,7 +254,7 @@ struct Buffer : std::vector<byte> {
this->push_back(0x80 + GB(value, 6, 6));
this->push_back(0x80 + GB(value, 0, 6));
} else {
StrgenWarning("Invalid unicode value U+{:#X}", value);
StrgenWarning("Invalid unicode value U+0x{:X}", value);
}
}
};
@@ -753,7 +753,7 @@ void StringReader::HandleString(char *str)
}
if (this->data.strings[this->data.next_string_id] != nullptr) {
StrgenError("String ID {:#X} for '{}' already in use by '{}'", this->data.next_string_id, str, this->data.strings[this->data.next_string_id]->name);
StrgenError("String ID 0x{:X} for '{}' already in use by '{}'", this->data.next_string_id, str, this->data.strings[this->data.next_string_id]->name);
return;
}